JSPM

  • Created
  • Published
  • Downloads 849
  • Score
    100M100P100Q127183F
  • License MIT

Parse METAR and TAF reports

Package Exports

  • metar-taf-parser
  • metar-taf-parser/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (metar-taf-parser) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

✈️ metar-taf-parser

Parser for METeorological Aerodrome Reports (METARs) and Terminal Aerodrome Forecasts (TAFs). This is a port of python-metar-taf-parser to Typescript. It's dependency-free, fully typed, tested, has i18n support, and can run on Node or in the browser.

Check out the demo here

Installation

yarn add metar-taf-parser
# or
npm i --save metar-taf-parser

Usage

Parse a METAR

import { parseMetar } from 'metar-taf-parser'

const metar = parseMetar(rawMetarString)

Parse a TAF

import { parseTAF } from 'metar-taf-parser'

const taf = parseTAF(rawTAFString)

i18n

import { parseMetar } from 'metar-taf-parser'
import de from 'metar-taf-parser/dist/locale/de'

const { metar } = await myService.getAirportData('KMSN')

const metarResult = parseMetar(metar, { locale: de })

Development

Example site

Please see the example site README.md.

Contributing

This project is intended to provide feature parity with python-metar-taf-parser and will only accept PRs to maintain feature parity or to fix inconsistencies with that project.

Acknowledgment

This software port was made possible due to the fantastic work of @mivek in python-metar-taf-parser. If you like this project, please consider buying @mivek a coffee.