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

aviation-names

v1.0.8

Published

Fast, offline airport and airline name lookup by IATA code. No API, no database, no network requests.

Readme

aviation-names

Fast, offline airport & airline name lookup by IATA code.

import { airport, airline } from "aviation-names";

airport("CGK");
// "Soekarno-Hatta International Airport"

airline("GA");
// "Garuda Indonesia"

Features

  • Instant — O(1) key lookup, ~27M lookups/sec
  • Offline — the dataset is bundled, nothing is fetched at runtime
  • No API — no endpoint to call
  • No API key — nothing to configure
  • No database — no query layer, no connection
  • No network requests — zero at runtime, ever
  • Global coverage — 9,054 airports, 1,109 airlines
  • Lightweight — 8.4 KB brotli for airlines alone, 86.3 KB for both
  • Zero runtime dependencies
  • TypeScript — full type declarations included
  • Browser compatible
  • Next.js compatible
  • Cloudflare Workers compatible
  • Node.js compatible
  • Bun compatible

Install

npm install aviation-names

Usage

import { airport, airline } from "aviation-names";

airport("CGK");
// "Soekarno-Hatta International Airport"

airport("DPS");
// "I Gusti Ngurah Rai International Airport"

airline("GA");
// "Garuda Indonesia"

airline("QZ");
// "Indonesia AirAsia"

Lookups are case-insensitive and whitespace-tolerant:

airport("cgk");   // "Soekarno-Hatta International Airport"
airport(" CGK "); // "Soekarno-Hatta International Airport"

airline("ga");    // "Garuda Indonesia"
airline(" GA ");  // "Garuda Indonesia"

Unknown or malformed codes return null rather than throwing:

airport("ZZZ"); // null
airline("ZZ");  // null
airport("");    // null

Granular imports

Import only the dataset you need. An airline-only consumer never pays for the airport data.

import { airport } from "aviation-names/airport";
import { airline } from "aviation-names/airline";

API

airport(code: string): string | null;
airline(code: string): string | null;

Both normalize input with trim then toUpperCase. Both return null for unknown codes, empty strings, wrong-length codes, and non-string values passed from untyped JavaScript.

Size

Measured on the built output, including the lookup code.

| Entry | Raw | Gzip | Brotli | | --- | --- | --- | --- | | aviation-names/airport | 239.6 KB | 92.1 KB | 78.5 KB | | aviation-names/airline | 20.1 KB | 9.6 KB | 8.4 KB | | aviation-names (both) | 258.6 KB | 100.8 KB | 86.3 KB |

Performance

Run npm run benchmark to reproduce these on your own machine.

| Metric | Airport | Airline | | --- | --- | --- | | Entries | 9,054 | 1,109 | | Module import | 2.50 ms | 0.74 ms | | Index build (first lookup) | 2.24 ms | 0.23 ms | | Throughput (1M lookups) | 26.8M ops/sec | 33.3M ops/sec |

The dataset is stored as a single packed string and indexed into a Map on the first lookup. Importing the package without calling anything costs only the string itself.

Scope

This package does one thing:

IATA code in → human-readable name out

It deliberately does not provide flight status, routes, schedules, aircraft or fleet data, coordinates, timezones, weather, geolocation, or fuzzy search.

Data

| | Airports | Airlines | | --- | --- | --- | | Source | OurAirports | Wikidata P229 | | Licence | Public domain | CC0 1.0 | | Refreshed | Daily via CI | Daily via CI |

Dataset updates are fetched daily by a scheduled GitHub Action and, if the data actually changed and every validation and test passes, published automatically as a patch release. See DATA_SOURCES.md for the full provenance, filtering rules and known limitations.

An IATA airline designator does not imply IATA membership. aviation-names does not use IATA membership as an inclusion criterion, and is not affiliated with or endorsed by IATA.

Licence

MIT. Bundled data is public domain / CC0 — see LICENSE.