YAML parser that preserves comments and styling
JavaScript HTML
Latest commit d15f86b Nov 23, 2015 @mohsen1 Add .vscode ot repo
Permalink
Failed to load latest commit information.
.vscode Add .vscode ot repo Nov 24, 2015
demo Add bower dependencies to demo.js Nov 4, 2015
dist new build Nov 4, 2015
src Update UDM exposing mechanism Nov 4, 2015
test
.eslintignore Setup eslint Sep 23, 2015
.eslintrc Recurse for map objects Oct 2, 2015
.gitignore Add .vscode ot repo Nov 24, 2015
.travis.yml Stop testing with iojs in TravisCI Nov 6, 2015
LICENSE Add license Sep 23, 2015
README.md Fix another typo in README Nov 6, 2015
bower.json 1.2.1 Nov 4, 2015
index.html Add home redirect html page Sep 25, 2015
jsconfig.json Add .vscode ot repo Nov 24, 2015
package.json 1.2.1 Nov 4, 2015
playground.html Work in progress Sep 24, 2015

README.md

YAWN YAML

Build Status

YAML parser that preserves comments and styling

Live Demo

Usage

import YAWN from 'yawn-yaml';

let str = `
# my comment
value: 1 # the value is here!
`;

let yawn = new YAWN(str);

yawn.json = {value: 2};


// value in `yawn.yaml` is now changed.
console.log(yawn.yaml); // =>
// # my comment
// value: 2 # the value is here!

Installation

Use npm or Bower to install "yawn-yaml" package

npm install --save yawn-yaml
bower install --save yawm-yaml

If you wish to depend to ES6 version use src/index.js file.

Development

To install dependencies run:

npm install

To run the test run:

npm test

To run tests continuously and watch for changes install mocha and run:

mocha --compilers js:babel/register -w

To make a new build run:

npm run browserify

License

MIT