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

@1-/yml

v0.1.3

Published

A minimalist, high-performance, single-pass YAML parser with LLM fault tolerance

Readme

English | 中文


@1-/yml : Minimalist High-Fault-Tolerant YAML Parser

Functionality

Designed specifically for YAML generated by Large Language Models (LLMs). Conventional parsers fail on common LLM artifacts — irregular indentation, unclosed quotes, empty values, or inline comments. This parser employs a single-pass, stack-based state machine to achieve robust, one-scan parsing.

Usage Demo

bun add @1-/yml
import load from "@1-/yml/load.js";
import loads from "@1-/yml/loads.js";

// Parse YAML string
const obj = loads("a: 1\nb:\n  c: 2");

// Parse YAML file
const fileObj = load("./conf.yml");

Design Rationale

Core logic is an indentation-driven stack state machine. Each line undergoes three phases:

  1. Indent depth calculation
  2. Key-value boundary detection (quotes, comments)
  3. Dynamic stack update based on relative indent change

Tech Stack

  • Runtime: ES Module (Node.js ≥18 / Bun)
  • Core dependency: @3-/read (file I/O)

Code Structure

src/
├── loads.js     # Primary parser: string → JS object/array
└── load.js      # File wrapper: path → JS object/array

Historical Note

YAML was co-designed in 2001 by Clark Evans, Ingy döt Net, and Oren Ben-Kiki as a human-friendly data serialization language. Its name — “YAML Ain’t Markup Language” — deliberately rejects markup semantics, prioritizing direct representation of native data structures (mappings, sequences, scalars). This parser honors that ethos: it avoids complex ASTs and backtracking, using only a lean state machine to recover semantic intent from imperfect input.

About

This library is developed by WebC.site.

WebC.site: A new paradigm of web development for AI


@1-/yml : 极简高容错 YAML 解析器

功能介绍

专为大语言模型(LLM)生成的 YAML 设计。常规解析器因缩进不齐、引号未闭合、空值或注释干扰等常见瑕疵极易崩溃;本解析器采用单指针前向扫描状态机,一次遍历完成解析,具备强健的容错能力。

使用演示

bun add @1-/yml
import load from "@1-/yml/load.js";
import loads from "@1-/yml/loads.js";

// 解析字符串
const obj = loads("a: 1\nb:\n  c: 2");

// 解析文件
const fileObj = load("./conf.yml");

设计思路

核心为基于栈的缩进驱动状态机。每行解析包含三阶段:

  1. 计算当前缩进深度
  2. 扫描键、值、引号与注释边界
  3. 根据缩进变化动态维护嵌套栈

技术栈

  • 运行时:ES Module(Node.js ≥18 / Bun)
  • 核心依赖:@3-/read(文件读取)

代码结构

src/
├── loads.js     # 主解析器:字符串输入 → JS 对象/数组
└── load.js      # 文件封装:路径输入 → JS 对象/数组

历史故事

YAML 由 Clark Evans、Ingy döt Net 和 Oren Ben-Kiki 于 2001 年联合设计,初衷是成为“人类可读的数据序列化语言”。其名称 “YAML Ain’t Markup Language” 明确拒绝将自身定位为 XML 替代品,而是强调对原生数据结构(映射、序列、标量)的直接表达。本解析器延续这一精神,舍弃复杂语法树与多轮回溯,以极简状态机还原 YAML 的语义本质。

关于

本库由 WebC.site 开发。

WebC.site : 面向人工智能的网站开发新范式