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

skylink-sdk

v0.1.2

Published

TypeScript SDK for the SkyLink API

Readme

SkyLink TypeScript SDK

A client for the SkyLink API v3.1.

Install

bun add skylink-sdk

Quick start

import { Skylink } from "skylink-sdk";

const skylink = new Skylink({
  apiKey: process.env.SKYLINK_API_KEY!,
});

const metar = await skylink.getWeatherMetar({
  icao: "KJFK",
  parsed: true,
});

Method parameters use idiomatic camelCase; the SDK converts them to the API's query names. Path parameters are URL encoded, and undefined or null query values are omitted.

Airport parameters accept either ICAO or IATA codes. The SDK uses the bundled lookup data to send the format required by each endpoint:

// METAR expects ICAO, so "JFK" is sent as "KJFK".
await skylink.getWeatherMetar({ icao: "JFK" });

// Ticket search expects IATA, so "EGLL" is sent as "LHR".
await skylink.getTicketsSearch({ origin: "EGLL", destination: "KJFK" });

Codes are trimmed and normalized to uppercase. An unknown alternate-format code throws a RangeError before a billable API request is made. Airline ICAO/IATA codes, ICAO24 aircraft addresses, and aircraft type codes are left untouched. Endpoints documented to accept either airport-code format continue to pass either through. A single bundled ICAO-to-IATA lookup is used to derive both directions at startup.

RapidAPI

const skylink = new Skylink({
  apiKey: process.env.RAPIDAPI_KEY!,
  channel: "rapidapi",
});

The client selects the correct base URL and authentication headers for either direct SkyLink or RapidAPI subscriptions. A custom baseUrl, headers, fetch implementation, and timeout are also supported.

Errors and response metadata

Unsuccessful responses throw SkylinkError, with the HTTP status, parsed response body, original Response, and rate-limit values.

import { SkylinkError } from "skylink-sdk";

try {
  await skylink.getNotams({ icao: "KJFK" });
} catch (error) {
  if (error instanceof SkylinkError) {
    console.error(error.status, error.body, error.rateLimit.remaining);
  }
}

Generated endpoint methods return the decoded response body directly. Use requestWithResponse when you also need response headers and metadata:

const result = await skylink.requestWithResponse<{ raw: string }>(
  "GET",
  "/weather/metar/KJFK",
  { query: { parsed: true } },
);

console.log(result.data, result.rateLimit);

Every request accepts { signal, headers } as its final argument. The default timeout is 15 seconds.

Endpoint coverage

The generated client covers all 58 operations in the current v3.1 OpenAPI document, including weather, schedules, airports, airlines, live and historical ADS-B, routes, charts, aircraft, NOTAMs, FAA delays, briefings and PDFs, carbon estimates, tickets, webhooks, navaids, countries, and regions.

Regenerate the endpoint types and methods from the live public specification:

bun run generate

The generator intentionally uses no OpenAPI package. Response types reflect the published schema exactly; operations whose OpenAPI response schema is empty safely return unknown rather than claiming undocumented fields.

Development

bun test
bun run typecheck