npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

espadon

v1.0.1

Published

A lightweight (~50 kB) universal typed client for Datalastic APIs: vessel live tracking, info, port info, routes, ...

Readme

Espadon for Datalastic

Espadon 🐟 is a lightweight 🪽 (~50 kB) universal client for the Datalastic API 🌎, built in Typescript with only 1 dependency, Zod, which formats the data for you ⭐️.

Report a bugForum

Installation

npm install espadon
# or
pnpm install espadon
# or
deno install npm:espadon
# ...

Quick usage

import { Espadon } from 'espadon';

const esp = Espadon({ key: process.env.API_KEY! });

let vessel = await esp.vessel({ imo: 9525338 });
console.log(vessel.name);

Options

The Espadon constructor supports the following options.

| Option | Description | Default | | :--------- | :------------------------------- | :----------------------------------- | | key | Your API secret key | None (required) | | baseUrl | The base endpoint URL | https://api.datalastic.com/api/ | | version | The API version | v0 | | validate | Validates JSON and coerces data | true | | debug | Logs the URL before the request | false | | timeout | Requests timeout in milliseconds | null |

Endpoints

This is the list of currently supported endpoints. If yours is not in this list, please open a request.

Live vessel tracking

// Basic live tracking by IMO, MMSI or UUID
let data = await esp.vessel({ imo: 9525338 });
let data = await esp.vessel({ mmsi: 566093000 });
let data = await esp.vessel('b8625b67-7142-cfd1-7b85-595cebfe4191');
// Pro live tracking with draught, departure/arrival ports, ATD, ETA
let data = await esp.vesselPro({ imo: 9525338 });
// Bulk with up to 100 vessels in a single call
let data = await esp.vesselBulk([
  { imo: 9525338 },
  { imo: 9249403 },
  { mmsi: 235362000 },
  // ...
]);

Location traffic tracking

// Scan an area around coordinates or a port
let data = await esp.vesselInradius({ lat: 29.15, lon: -89.25, radius: 3 });
let data = await esp.vesselInradius({ port_unlocode: 'NLRTM', radius: 10, type: 'Cargo' });
// Scan an area around a vessel
let data = await esp.vesselInradius({ mmsi: 566093000, radius: 5 });

Historical vessel data

// By number of days
let data = await esp.vesselHistory({ imo: 9797058, days: 7 });
// By date range (Date objects or strings, formatted automatically)
let data = await esp.vesselHistory({ imo: 9797058, from: '2025-06-01', to: '2025-06-03' });

Vessel specs info

// Detailed vessel specifications (draught, TEU, deadweight, dimensions…)
let data = await esp.vesselInfo({ mmsi: 566093000 });

Vessel finder

// Search vessels by name, type, country, tonnage, dimensions…
let data = await esp.vesselFind({ name: 'eric', fuzzy: 1 });
let data = await esp.vesselFind({ type: 'Cargo', country_iso: 'SG', gross_tonnage_min: 20000 });

Port finder

// Search ports by name, UNLOCODE, country or coordinates
let data = await esp.portFind({ name: 'rotterdam', fuzzy: 1, port_type: 'port' });
let data = await esp.portFind({ unlocode: 'ESMPG' });

Port terminals

// Detailed port info with terminals, operators and contact details
let data = await esp.portInfo({ unlocode: 'ESMPG' });

Sea routes

// Optimal maritime route between two points (coordinates, UUIDs or UN/LOCODEs)
let data = await esp.route({ port_unlocode_from: 'FIHEL', port_unlocode_to: 'EETLL' });
let data = await esp.route({ port_unlocode_from: 'FIHEL', lat_to: 33.7, lon_to: -119 });

Satellite estimated position

// Estimated vessel position when out of AIS range
let data = await esp.satellite({ imo: 9156462 });

Any

// Any unsupported endpoint
let data = await esp.any('/unsupported-endpoint', null, { foo: 'bar' });

This method allows you to use espadon even for unsupported endpoints if an API update occurs. You can also provide a schema to validate the output.