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

@younndai/yon-parser

v2.0.2

Published

Reference parser, validator, and formatter for YON™ — the stream-first data format for AI agent workflows.

Readme

npm license

What is this?

@younndai/yon-parser is the reference implementation of the YON v2.0 block format — a parser, validator, and deterministic formatter. Reference implementations define correctness: other YON parsers should match this behavior. It parses YON text into a structured AST, validates records and blocks against the spec and domain schemas, and formats documents in canonical, minimal, and ultra-compact modes.

Install

npm install @younndai/yon-parser

Quick Start

import { parse, validate, format } from "@younndai/yon-parser";

// Parse YON string → AST
const doc = parse('@DOC ver=2.0 | id=test | title="Hello"\n@NOTE text="World"');

// Validate (strict mode)
const result = validate(doc, { strict: true });
if (!result.valid) {
  console.error(result.errors);
}

// Format (deterministic output)
const formatted = format(doc, { mode: "canon" });

Key Features

  • Full YON v2.0 compliance — conformance vectors + comprehensive deterministic test suite.
  • Streaming parser — line-by-line event-driven parsing for transport.
  • Granular validation API — per-record and per-block validation, field constraints (range, enum, pattern, type), and domain lifecycle checking.
  • Domain resolution — 34 bundled offline domains (full list: listDomains('official')), remote resolution with caching, and runtime registration of custom schemas.
  • Deterministic formatting — canon, min, and ultra output modes, plus SHA-256 block integrity helpers.
  • Detailed diagnostics — line numbers and error codes on every failure.

CLI

yon validate document.yon --profile exec   # Validate a file
yon validate document.yon --lenient        # Validate in lenient mode
yon format document.yon --mode CANON       # Format a file
yon format document.yon --check            # Format with diff check
yon parse document.yon --json              # Parse and output JSON AST

Documentation

| Document | Description | | -------------------------------- | --------------------------------------------------------- | | Overview | Architecture, processing pipeline, spec mapping | | Parsing | parse(), Lexer, token types, AST shape | | Validation | validate(), granular API, field constraints, lifecycle | | Formatting | format(), canon/min/ultra modes, granular formatting | | Streaming | StreamingYonParser, line-by-line transport parsing | | Domains | Two-tier resolution, registration, lifecycle, constraints | | Integrity | SHA-256 verification helpers | | Reference | Types, constants, error codes, profiles, features | | How to Use | Comprehensive usage guide with examples | | Changelog | Version history and release notes |

The YON Project

YON is an open block format and toolchain.

Testing

# Run all tests (see TESTING.md for current count)
npx vitest run

# Generate a timestamped report
npx tsx test/generate-report.ts

See TESTING.md for test architecture, conformance vectors, and the report generator.


About YounndAI

YounndAI™ — You and AI, unified. (pronounced "yoon-dye")

A philosophy of intelligence: building with intention, so humans and machines think together without losing what makes either whole.

License & Attribution

Apache-2.0. © 2026 MARLINK TRADING SRL (YounndAI). See LICENSE and NOTICE.

"YON" and "YounndAI" are trademarks of MARLINK TRADING SRL — see TRADEMARK.md.

Created by Alexandru Mareș.

Website: yon.younndai.com


| | | | ------------- | ------------------------------------------------------- | | Spec | YON v2.0 | | Author | Alexandru Mareș | | Company | MARLINK TRADING SRL · YounndAI™ | | License | Apache 2.0 — © 2026 MARLINK TRADING SRL | | Trademark | YounndAI™ Trademark Guidelines |