ts-airport-diagrams
TypeScript icon, indicating that this package has built-in type declarations

1.0.6 • Public • Published

ts-airport-diagrams

Fetch the latest airport diagrams from https://www.faa.gov/

NPM Version Maintainability

Installation

Install using npm:

npm install ts-airport-diagrams --save

Install using pnpm:

pnpm install ts-airport-diagrams

Install using yarn:

yarn add ts-airport-diagrams

Install using bun:

bun add ts-airport-diagrams

Usage

import { airportDiagrams } from 'ts-airport-diagrams'

const cycle = await airportDiagrams.fetchCurrentCycle()
console.log('Current cycle:', cycle)

const diagrams = await airportDiagrams.list(['PANC', 'KSEA'])
console.log(JSON.stringify(diagrams, null, 2))

Output

[
  [
    {
      "state": "AK",
      "city": "ANCHORAGE",
      "airport": "TED STEVENS ANCHORAGE INTL",
      "ident": "ANC (PANC)",
      "vol": "AK-1",
      "flag": "",
      "procedure": {
        "name": "AIRPORT DIAGRAM (PDF)",
        "url": "http://aeronav.faa.gov/d-tpp/1813/01500ad.pdf#nameddest=(ANC)"
      },
      "compare": {
        "name": "N/A"
      }
    }
  ],
  [
    {
      "state": "WA",
      "city": "SEATTLE",
      "airport": "SEATTLE-TACOMA INTL",
      "ident": "SEA (KSEA)",
      "vol": "NW-1",
      "flag": "",
      "procedure": {
        "name": "AIRPORT DIAGRAM (PDF)",
        "url": "http://aeronav.faa.gov/d-tpp/1813/00582ad.pdf#nameddest=(SEA)"
      },
      "compare": {
        "name": "N/A"
      }
    }
  ]
]

API

airportDiagrams(icaos)

airportDiagrams.list(icaos)

icaos

Type: string or array

One of the following:

  • a single ICAO code
  • an array of ICAO codes

airportDiagrams.fetchCurrentCycle()

Fetch the current diagrams distribution cycle numbers (.e.g, 1813)

Authors

Original Author: Forrest Desjardins

Update Author: Jared Hernandez

Readme

Keywords

none

Package Sidebar

Install

npm i ts-airport-diagrams

Weekly Downloads

1

Version

1.0.6

License

none

Unpacked Size

32.5 kB

Total Files

7

Last publish

Collaborators

  • jaredthejelly