airportsjs

A library to help search for airports and their codes

Usage no npm install needed!

<script type="module">
  import airportsjs from 'https://cdn.skypack.dev/airportsjs';
</script>

README

airportsjs

Circle CI

A library to help you search and obtain airport codes.

Install

npm install airportsjs --save

Usage

index.lookupByIataCode('EWR')

{ name: 'Newark Liberty Intl',
  city: 'Newark',
  country: 'United States',
  iata: 'EWR',
  latitude: 40.6925,
  longitude: -74.168667 }
index.searchByAirportName('Newark')

[ { name: 'Newark Liberty Intl',
    city: 'Newark',
    country: 'United States',
    iata: 'EWR',
    latitude: 40.6925,
    longitude: -74.168667 },
  { name: 'Newark Penn Station',
    city: 'Newark',
    country: 'United States',
    iata: 'ZRP',
    latitude: 40.734722,
    longitude: -74.164167 } ]

License

MIT.