parse-yaya
A Yet Another Yet Another Markup Language parser for Node.js and browsers.
Contents
Installation
npm install @rgrove/parse-yaya
Or, if you like living dangerously, you can load the minified UMD bundle
in a browser via Unpkg and use the parseYaya
global.
Features
-
Parses Yaya.
-
Has at least two problems.
Usage
const parseYaya = require('@rgrove/parse-yaya');
parseYaya('{"key": "value",/* and now, an array */"key2": ["value1", "value2",]}, // trailing comment');
The result is a JS object with the following structure:
{
key: 'value',
key2: [ 'value1', 'value2' ]
}
Why?
Why not?