yaml-unist-parser

A YAML parser that produces output compatible with unist

MIT 31 个版本
安装
npm install yaml-unist-parser
yarn add yaml-unist-parser
pnpm add yaml-unist-parser
bun add yaml-unist-parser
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

版本列表
3.2.0 2026-06-01
3.1.0 2025-12-03
3.0.0 2025-12-03
2.2.1 2025-12-03
2.2.0 2025-12-03
2.1.1 2025-11-21
2.1.0 2025-11-21
2.0.5 2025-03-21
2.0.4 2025-03-21
2.0.3 2025-03-20
2.0.2 2025-03-20
2.0.1 2022-10-14
2.0.0 2022-10-14
1.3.1 2020-09-08
1.3.0 2020-08-01
1.2.1 2020-05-24
1.2.0 2020-05-23
1.1.1 2019-10-09
1.1.0 2019-10-08
1.0.1 2019-10-08
1.0.0-rc.4 2018-08-30
1.0.0-rc.3 2018-07-31
1.0.0-rc.2 2018-07-17
1.0.0-rc.1 2018-06-28
1.0.0-rc.0 2018-06-24
1.0.0-beta.4 2018-06-16
1.0.0-beta.3 2018-05-27
1.0.0-beta.2 2018-05-27
1.0.0-beta.1 2018-05-27
1.0.0-beta.0 2018-05-26
1.0.0 2018-11-15