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

yini-parser

v1.4.3

Published

TypeScript/JavaScript parser for YINI — a human-friendly config format that combines INI-style simplicity with real structure, nested sections, comments, and predictable parsing.

Readme

yini-parser

Readable configuration for Node.js and TypeScript — without YAML foot-guns or JSON noise.

The official TypeScript / Node.js parser for YINI (by the YINI-lang project) — a human-friendly configuration format with real structure, nested sections, comments, and predictable parsing.

YINI is designed for applications, tools, and services that need configuration that stays readable for humans without becoming vague, fragile, or hard to maintain.

npm version All Test Suites All Regression Tests Grammar Drift Check npm downloads

Quick Start

npm install yini-parser
import YINI from 'yini-parser'

const config = YINI.parse(`
^ App
name = 'My App'
darkMode = true

    ^^ Features
    caching = on
`)

console.log(config.App.name)              // My App
console.log(config.App.Features.caching)  // true

➡️ Learn more in the YINI specification and documentation.


🙋‍♀️ Why try YINI?

  • Readable by humans — Less noisy than JSON, less fragile than indentation-driven formats.
  • Structured enough for real configuration — Sections, nested sections, lists, objects, booleans, and null.
  • Predictable parsing — Explicit syntax with clear rules.
  • Easy to use from TypeScript/Node.js — Parse from strings or files in a few lines.

What YINI looks like in practice

A basic YINI configuration example, showing a section, nested section, comments:
YINI Config Example Source: basic.yini

  • ▶️ Link to Demo Apps with complete basic usage.

Why YINI works well for configuration

  • Indentation-independent structure: Spaces and tabs never change meaning, so files can be reformatted without changing structure.
  • Explicit nesting: Hierarchy is defined with section markers like ^, ^^, and ^^^, making large configurations easier to scan and refactor.
  • Multiple data types: Supports booleans (true / false, yes / no, etc.), numbers, lists, and inline objects, with explicit string syntax.
  • Comment support: YINI supports multiple comment styles (#, //, /* ... */, and ;), making it easier to document configuration directly in the file.
  • Predictable parsing: Clear rules with optional strict and lenient modes for different use cases.

Usage

Install with your package manager

With npm:

npm install yini-parser

With yarn:

yarn add yini-parser

With pnpm:

pnpm add yini-parser

Node.js (CommonJS)

Note: Only a default export (YINI) is provided. Named imports are not supported.

const YINI = require('yini-parser').default;
// If your setup handles default interop differently, try:
// const YINI = require('yini-parser');

// Parse from string.
const config = YINI.parse(`
    ^ App
    title = 'My App Title'
    items = 25
    isDarkTheme = true
`);

// Parse from file.
const configFromFile = YINI.parseFile('./config.yini');

TypeScript (with "esModuleInterop": true)

import YINI from 'yini-parser';

// Parse from string.
const config = YINI.parse(`
    ^ App
    title = "My App Title"
    items = 25
    isDarkTheme = OFF
`);

// Parse from file.
const configFromFile = YINI.parseFile('./config.yini');

Example Output

// JS object
{
   App: {
      title: "My App Title",
      items: 25,
      isDarkTheme: false
   }
}

📂 More Examples

Example 2

A real-world YINI configuration example, showing sections, nesting, comments, and multiple data types:
YINI Config Example Source: config.yini


🧪 Testing and Stability

This parser is continuously validated through comprehensive regression and smoke tests, ensuring deterministic parsing behavior across default, strict, and metadata-enabled modes.


Links


🤝 Contributing

We welcome feedback, bug reports, feature requests, and code contributions!

If this library is useful to you, a GitHub star helps more people discover the project and supports future development.

Documentation

  • Project Setup — How to run, test, and build the project, etc.
  • Conventions — Project conventions, naming patterns, etc.

License

This project is licensed under the Apache-2.0 license — see the LICENSE file for details.

In this project on GitHub, the libs directory contains third party software and each is licensed under its own license which is described in its own license file under the respective directory under libs.


^YINI ≡

Readable like INI. Structured like JSON. No indentation surprises.

Predictable configuration with clear rules.

yini-lang.org · YINI-lang on GitHub