A YAML parser that produces output compatible with unist
# using npm
npm install --save yaml-unist-parser
# using yarn
yarn add yaml-unist-parser
import { parse } from "yaml-unist-parser";
const ast = parse(`
- hello
- world
`);
uniqueKeystype 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',...}
# lint
yarn run lint
# build
yarn run build
# test
yarn run test
MIT © Ika
TypeScript
98.1%
JavaScript
1.9%
A YAML parser that produces output compatible with unist
# using npm
npm install --save yaml-unist-parser
# using yarn
yarn add yaml-unist-parser
import { parse } from "yaml-unist-parser";
const ast = parse(`
- hello
- world
`);
uniqueKeystype 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',...}
# lint
yarn run lint
# build
yarn run build
# test
yarn run test
MIT © Ika
TypeScript
98.1%
JavaScript
1.9%