iata-search.js
iata-search.js is a Node.js module that allows you to headlessly search airline codes from https://www.iata.org/en/about/members/airline-list/ and airport codes from https://www.iata.org/en/publications/directories/code-search/
Installation
- Install NodeJS.
With GitHub:
- Download or clone the project.
- Go to the
iata-search.js
folder and runnpm install
. - Require
client.js
.
With npm:
- Run
npm install iata-search.js
. - Require the library.
Documentation
Example usage
The library can be used in both CommonJS and ES Modules
Using the library - API
The library is async, be sure to use async functions or .then()
const { Client } = require("iata-search.js");
// OR
import { Client } from "iata-search.js";
const client = new Client();
client.airport("JFK").then((data) => {
console.log(data);
});
// OR
const getAirport = async () => {
const data = await client.airport("JFK");
console.log(data);
};
getAirport();
Credits
Copyright
See the license