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

tidecheck

v1.0.0

Published

Official TypeScript/JavaScript client for the TideCheck API — tide predictions, sun/moon data, and solunar forecasts for 6,470+ stations worldwide.

Downloads

75

Readme

tidecheck

Official TypeScript/JavaScript client for the TideCheck API — tide predictions, sun/moon data, and solunar forecasts for 6,470+ stations in 176 countries.

Install

npm install tidecheck

Quick Start

import { TideCheck } from "tidecheck";

const tc = new TideCheck("tc_live_your_api_key");

// Get tide predictions
const tides = await tc.tides("san-francisco", { days: 7, datum: "LAT" });

for (const extreme of tides.extremes) {
  console.log(`${extreme.type}: ${extreme.height}m at ${extreme.time} (${extreme.localDate})`);
}

Get an API Key

  1. Sign up at tidecheck.com/dashboard/login
  2. Create a key at tidecheck.com/dashboard/keys
  3. Free tier: 50 requests/day, no credit card required

API

new TideCheck(apiKey)

// Simple — just pass your API key
const tc = new TideCheck("tc_live_...");

// With options
const tc = new TideCheck({
  apiKey: "tc_live_...",
  baseUrl: "https://tidecheck.com", // optional, defaults to this
});

tc.tides(stationId, options?)

Get tide predictions for a station.

const tides = await tc.tides("san-francisco", {
  days: 7,       // 1-37, default 9
  datum: "LAT",  // "LAT" | "MLLW" | "MSL", default "LAT"
  start: "2026-04-01", // optional start date
});

Returns:

{
  station: { id, name, region, country, lat, lng, type, timezone },
  datum: "LAT",
  extremes: [
    { type: "high", time: "2026-03-09T05:42:00Z", localDate: "2026-03-09", height: 1.83 },
    { type: "low",  time: "2026-03-09T11:18:00Z", localDate: "2026-03-09", height: 0.42 },
  ],
  timeSeries: [
    { time: "2026-03-09T00:00:00Z", height: 1.23 },
    // ... every 15 minutes
  ],
  conditions: { sunrise, sunset, moonPhase, moonIllumination, tidalStrength, springNeap, moonCalendar },
  dailyConditions: [
    { date: "2026-03-09", sunrise, sunset, moonPhase, moonIllumination, solunarRating, solunarLabel, springNeap },
  ]
}

tc.search(query)

Search for stations by name, region, or country.

const stations = await tc.search("moalboal");
// [{ id: "fes2022-moalboal", slug: "moalboal", name: "Moalboal", region: "Cebu", country: "Philippines", label: "..." }]

tc.nearest(lat, lng)

Find the 5 nearest stations to a coordinate.

const nearby = await tc.nearest(37.8063, -122.466);
// [{ id: "9414290", name: "San Francisco", distanceKm: 0, ... }]

tc.geocode(query)

Geocode a place name to coordinates. Useful for finding stations near a location.

const places = await tc.geocode("Bali");
const nearby = await tc.nearest(places[0].lat, places[0].lng);
const tides = await tc.tides(nearby[0].id);

Error Handling

import { TideCheck, TideCheckError } from "tidecheck";

try {
  const tides = await tc.tides("invalid-station");
} catch (err) {
  if (err instanceof TideCheckError) {
    console.error(err.status);  // 404
    console.error(err.body);    // { error: "Station not found" }
  }
}

Common Patterns

Next high tide

const tides = await tc.tides("san-francisco");
const nextHigh = tides.extremes.find(
  (e) => e.type === "high" && new Date(e.time) > new Date()
);

Group tides by local date

const tides = await tc.tides("fes2022-moalboal", { days: 7 });
const byDay: Record<string, typeof tides.extremes> = {};
for (const e of tides.extremes) {
  (byDay[e.localDate] ??= []).push(e);
}
// { "2026-03-09": [...], "2026-03-10": [...] }

Find tides for a place name

const places = await tc.geocode("Santorini, Greece");
const nearby = await tc.nearest(places[0].lat, places[0].lng);
const tides = await tc.tides(nearby[0].id, { days: 3 });

Timestamps

All time fields are ISO 8601 UTC. Each extreme includes a localDate field (YYYY-MM-DD) in the station's local timezone for easy day grouping. Use station.timezone (IANA, e.g. "Asia/Manila") to convert to local display times.

Rate Limits

Response headers include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.

| Plan | Requests/day | Keys | |------|-------------|------| | Free | 50 | 1 | | Starter ($9/mo) | 1,000 | 3 | | Pro ($29/mo) | 10,000 | 10 | | Business ($79/mo) | 50,000 | 25 |

Requirements

  • Node.js 18+ (or any runtime with global fetch: Deno, Bun, Cloudflare Workers, browsers)
  • No dependencies

Links

License

MIT