JSPM

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

Parse METAR and TAF files

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

This is a port of python-metar-taf-parser to typescript. It's fully typed and tested with i18n support, and can run on Node or the browser.

Example

⚠️ This project is an active work in progress. These examples do not currently work.

Parse METAR

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

// Get the raw METAR/TAF strings in your preferred way
// For example: https://www.aviationweather.gov/dataserver
const { metar } = await myService.getAirportData('KMSN')

// Readily serializable
const metarResult = parseMetar(metar)

// Your code here 🚀

Parse TAF

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

// Get the raw METAR/TAF strings in your preferred way
// For example: https://www.aviationweather.gov/dataserver
const { taf } = await myService.getAirportData('KMSN')

// Readily serializable
const tafResult = parseTAF(taf)

// Your code here 🚀

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.