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

@squawk/procedures

v0.4.3

Published

Instrument procedure lookup and expansion for SIDs, STARs, and Instrument Approach Procedures (IAPs)

Readme

MIT License npm TypeScript

Pure logic library for querying US instrument procedure data sourced from FAA CIFP (Coded Instrument Flight Procedures). Covers SIDs, STARs, and Instrument Approach Procedures (IAPs) in a unified ARINC 424 leg model. Look up by identifier, by airport, by runway, by approach type; expand a procedure into an ordered leg sequence; or search by name. Contains no bundled data - accepts an array of Procedure records at initialization. For zero-config use, pair with @squawk/procedure-data.

Part of the @squawk aviation library suite. See all packages on npm.

Usage

import { usBundledProcedures } from '@squawk/procedure-data';
import { createProcedureResolver } from '@squawk/procedures';

const resolver = createProcedureResolver({ data: usBundledProcedures.records });

// Look up every adaptation of an identifier across airports
const allSardi = resolver.byIdentifier('SARDI1');

// Resolve a specific procedure at an airport
const aalleAtDen = resolver.byAirportAndIdentifier('KDEN', 'AALLE4');
const ilsAtJfk = resolver.byAirportAndIdentifier('KJFK', 'I04L');

// Find every procedure for an airport
const jfkProcedures = resolver.byAirport('KJFK');

// Find procedures that serve a specific runway
const jfk04LApproaches = resolver.byAirportAndRunway('KJFK', '04L');

// Filter by type or approach classification
const allStars = resolver.byType('STAR');
const allIls = resolver.byApproachType('ILS');

// Expand a procedure into an ordered leg sequence (common route only)
const expansion = resolver.expand('KDEN', 'AALLE4');
if (expansion) {
  for (const leg of expansion.legs) {
    console.log(leg.pathTerminator, leg.fixIdentifier ?? '(no fix)');
  }
}

// Expand with a named transition (transition + common route merged in flying order)
const withTransition = resolver.expand('KDEN', 'AALLE4', 'BBOTL');

// Search by name or identifier
const results = resolver.search({ text: 'AALLE', type: 'STAR' });

Consumers who have their own procedure data can use this package standalone:

import { createProcedureResolver } from '@squawk/procedures';

const resolver = createProcedureResolver({ data: myProcedures });

API

createProcedureResolver(options)

Creates a resolver object from an array of Procedure records.

Parameters:

  • options.data - an array of Procedure objects (from @squawk/types).

Returns: ProcedureResolver - an object with the lookup methods described below.

resolver.byIdentifier(identifier)

Looks up every procedure matching a CIFP identifier (case-insensitive). CIFP identifiers are not globally unique - the same identifier (for example SARDI1 or I04L) is published separately for each adapted airport, so this returns all matches. Returns Procedure[].

resolver.byAirportAndIdentifier(airportId, identifier)

Resolves a single procedure by (airport, identifier). Case-insensitive for both arguments. Returns Procedure | undefined.

resolver.byAirport(airportId)

Returns every procedure (SID, STAR, or IAP) adapted at the given airport. Case-insensitive. Returns Procedure[].

resolver.byAirportAndRunway(airportId, runway)

Returns procedures at an airport that serve a specific runway. For IAPs, the match is on the runway field directly. For SIDs and STARs, the match is on a runway transition named RW<runway> (for example RW04L). Case-insensitive. Returns Procedure[].

resolver.byType(type)

Returns every procedure of a given type. Pass 'SID', 'STAR', or 'IAP'. Returns Procedure[].

resolver.byApproachType(approachType)

Returns every IAP of a given approach classification ('ILS', 'LOC', 'LOC_BC', 'RNAV', 'RNAV_RNP', 'VOR', 'VOR_DME', 'NDB', 'NDB_DME', 'TACAN', 'GLS', 'IGS', 'LDA', 'SDF', 'GPS', 'FMS', 'MLS'). Returns Procedure[].

resolver.expand(airportId, identifier, transitionName?)

Expands a procedure into an ordered leg sequence. Without a transition name, returns the procedure's first common route. With a transition name, merges the named transition's legs with the common route in flying order:

  • SID + enroute exit transition - common route first, then transition.
  • SID + runway transition (RW* name) - transition first, then common route.
  • STAR + enroute entry transition - transition first, then common route.
  • STAR + runway transition - common route first, then transition.
  • IAP + approach transition - transition first, then final approach segment.

The connecting fix between transition and common route is deduplicated when both segments reference it.

Returns ProcedureExpansionResult | undefined, containing:

  • procedure - the full Procedure record.
  • legs - the ordered ProcedureLeg sequence.

resolver.search(query)

Searches procedures by name or identifier using case-insensitive substring matching. Results are sorted by airport then identifier.

| Property | Type | Description | | -------------- | ------------- | -------------------------------------------------------------- | | text | string | Case-insensitive substring to match against name or identifier | | limit | number | Optional. Maximum number of results. Defaults to 20 | | type | ProcedureType | Optional. Restrict to 'SID', 'STAR', or 'IAP' only | | approachType | ApproachType | Optional. Restrict to IAPs of a given approach classification |

Returns Procedure[].