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

@metweave/parser

v0.2.0

Published

Tolerant METAR/SPECI parser to a JSON IR — unknown groups and missing values are never silent: warnings carry source spans, missing codes map to explicit states.

Readme

@metweave/parser

tolerant 的 METAR/SPECI 与 TAF 解析器,把原始报文解析为 @metweave/core IR。纪律是不静默:认不出的组带着原文 span 进 warnings[],缺测电码(//、////、/////KT、BKN///)映射为显式状态——绝不丢弃、绝不捏造。

安装

npm install @metweave/parser

最小示例

import { parse } from "@metweave/parser";

以真实公开报文语料验收(每类反常形态至少一条真实样本)。整报失败抛 MetarParseError,携带稳定的机读 code——只增不改的契约;请按 code 分流,不要依赖 message 措辞(全量错误码在 @metweave/core,英文文案见 EN_MESSAGES)。

TAF(FM 51)预报侧

import { expandTaf, parseTaf, tafSegments, validateTaf } from "@metweave/parser";

const taf = parseTaf("TAF ZBAA 240000Z 2400/2506 32004MPS 9999 FEW030 TN14/2403Z=");
const segs = tafSegments(taf); // 分段明细(主导段/过渡带/TEMPO·PROB 挂载行,按时间升序)
const violations = validateTaf(taf); // 条文判据:C2 VRB 两源阈值 / C3 阵风 / C5 天气白名单双层 / C7 三层选取
const strict = parseTaf(raw, { mode: "strict" }); // 严判:违例聚合抛 strict-violation(validateStandard 可选 "wmo"|"caac")

TAF 侧 strict 严判与 validateTaf 判据校验已落地(B7 间歇判据机器不可判,明示空集);METAR 侧 strict 仍在路线图。文档见主仓库。

许可

MIT © 2026 YaoJaro——授权仅覆盖本仓库的代码与文档;随包分发的报文样本不在其列,详见主仓库 README 的「许可」说明。