ikatyang/yaml-unist-parser

A YAML parser that produces output compatible with unist

28

stars

381

commits

TypeScript

primary language

Sep 12, 2026

updated

unist
yaml

README

yaml-unist-parser

npm coverage

A YAML parser that produces output compatible with unist

Features

Install

# using npm
npm install --save yaml-unist-parser

# using yarn
yarn add yaml-unist-parser

Usage

import { parse } from "yaml-unist-parser";

const ast = parse(`
- hello
- world
`);

Options

uniqueKeys

type boolean
default: true

Whether key uniqueness is checked.

parse("a: 1\na: 2");
// Uncaught SyntaxError [YAMLSyntaxError]: Map keys must be unique

parse("a: 1\na: 2", { uniqueKeys: false });
// {type: 'root',...}

Development

# lint
yarn run lint

# build
yarn run build

# test
yarn run test

License

MIT © Ika

Contributors

renovate-bot

190 commits

fisker

80 commits

ikatyang

75 commits

renovate[bot]

31 commits

ikatyang/yaml-unist-parser

A YAML parser that produces output compatible with unist

28

stars

381

commits

TypeScript

primary language

Sep 12, 2026

updated

unist
yaml

README

yaml-unist-parser

npm coverage

A YAML parser that produces output compatible with unist

Features

Install

# using npm
npm install --save yaml-unist-parser

# using yarn
yarn add yaml-unist-parser

Usage

import { parse } from "yaml-unist-parser";

const ast = parse(`
- hello
- world
`);

Options

uniqueKeys

type boolean
default: true

Whether key uniqueness is checked.

parse("a: 1\na: 2");
// Uncaught SyntaxError [YAMLSyntaxError]: Map keys must be unique

parse("a: 1\na: 2", { uniqueKeys: false });
// {type: 'root',...}

Development

# lint
yarn run lint

# build
yarn run build

# test
yarn run test

License

MIT © Ika

Contributors

renovate-bot

190 commits

fisker

80 commits

ikatyang

75 commits

renovate[bot]

31 commits

Languages

TypeScript

98.1%

JavaScript

1.9%