parser-cache compatible YAML parser, using js-yaml.
npm i parser-yaml --save
npm test
var parser = require('parser-yaml');
parser.parse(str, options, function(err, res) {
if (err) { throw err; }
console.log(res);
});
parser.parseFile('fixtures/a.yml', function (err, res) {
if (err) { throw err; }
console.log(res);
});
var res = parser.parseSync(str, options);
console.log(res);
str {String|Object}: The object or string to parse.options {Object|Function}: or cb callback function.cb {Function}: callback function.Parse the given str of YAML and callback cb(err, obj).
str {String|Object}: The object or string to parse.returns: {Object}Parse the given str of YAML.
YAML file support. Parse a file at the given filepath and callback callback(err, obj).
filepath {String}options {Object|Function}: or callback function.callback {Function}parser.parseFile('foo/bar/baz.yml');
YAML file support. Parse a file at the given filepath.
filepath {String}options {Object}: Options to pass to [js-yaml]parser.parseFile('foo/bar/baz.yml');
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Jon Schlinkert
Copyright (c) 2014 Jon Schlinkert
Released under the MIT license
This file was generated by verb on November 24, 2014.