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

airline-passport-requirements

v1.0.0

Published

Comprehensive passport, document, and date-of-birth requirements for 792 airlines — typed helpers for domestic & international flights

Readme

airline-passport-requirements

Typed passport, document, and date-of-birth requirements for 792 airlines — covering both domestic and international flights.

Zero runtime dependencies. Ships ESM + CJS + TypeScript declarations.

Install

npm install airline-passport-requirements

Quick Start

import {
  getAirlineByCode,
  isPassportRequired,
  getMandatoryFields,
  determinePassengerType,
} from 'airline-passport-requirements';

// Look up an airline
const airline = getAirlineByCode('AA');
console.log(airline?.airlineName); // "American Airlines"

// Check passport requirement
isPassportRequired('AA', 'international'); // true
isPassportRequired('AA', 'domestic');      // false

// Get mandatory fields for international flights
getMandatoryFields('AA', 'international');
// ["fullName", "dateOfBirth", "gender", "nationality", "passportNumber", ...]

// Determine passenger type from age
determinePassengerType('AA', 8); // "child"

API

Every helper accepts either an IATA airline code (string) or an AirlineRequirements object — so you can pass a code directly or reuse a previously-fetched object.

Data Exports

| Export | Description | | --- | --- | | passportRequirementsData | Full dataset (metadata + airlines + standards) | | airlines | Array of all 792 airline entries | | metadata | Version, last-updated date, notes | | passengerTypeStandards | IATA default adult/child/infant definitions |

Lookup Functions

| Function | Returns | | --- | --- | | getAirlineByCode(code) | AirlineRequirements \| undefined | | searchAirlinesByName(query) | AirlineRequirements[] — substring name search | | getAirlinesByCountry(countryCode) | AirlineRequirements[] — filter by ISO country | | getAirlinesWithData() | AirlineRequirements[] — only dataAvailable: true | | getAllAirlineCodes() | string[] — every IATA code in the dataset | | isValidAirlineCode(code) | boolean |

Requirement Functions

| Function | Returns | | --- | --- | | getRequirements(airline, flightType) | Domestic or international requirements section | | isPassportRequired(airline, flightType) | boolean \| null | | getMandatoryFields(airline, flightType) | string[] — mandatory field names | | getDocumentField(airline, flightType, fieldName) | Single document field detail | | getMandatoryDocumentsForPassenger(airline, flightType, paxType) | string[] — mandatory docs for ADT/CHD/INF | | getAcceptedIdentityDocuments(airline) | string[] — domestic accepted IDs | | getAdditionalDocuments(airline) | string[] — international additional docs | | getPassportExpiryValidity(airline) | string \| null — e.g. "6_months_before_expiry" |

Validation Functions

| Function | Returns | | --- | --- | | getDobRequirement(airline, flightType, paxType) | Full DOB requirement object | | isDobMandatory(airline, flightType, paxType) | boolean \| null | | getPassengerTypeInfo(airline, paxType) | Age ranges, IATA code | | getInfantMinimumAgeDays(airline) | number \| null | | determinePassengerType(airline, ageInYears) | 'adult' \| 'child' \| 'infant' |

Types

All TypeScript interfaces are exported:

import type {
  AirlineRequirements,
  DomesticRequirements,
  InternationalRequirements,
  DocumentField,
  DobRequirement,
  FlightType,        // 'domestic' | 'international'
  PassengerType,     // 'adult' | 'child' | 'infant'
  AirlineInput,      // string | AirlineRequirements
} from 'airline-passport-requirements';

Data Coverage

  • 792 airlines total
  • Airlines with dataAvailable: true have full document/DOB requirements
  • Airlines with dataAvailable: false are listed with null values
  • Data sourced from IATA standards, airline policies, and country regulations

License

MIT