Very thin wrapper around js-yaml for directly reading in YAML files.
npm install read-yaml> Very thin wrapper around js-yaml for directly reading in YAML files.
Install with npm:
``sh`
$ npm install --save read-yaml
Read yaml file asynchronously and parse content as JSON.
Params
* filepath {String}: Path of the file to read.options
* {Object|String}: to pass to js-yamlcb
* {Function}: Callback function
Example
``js`
var readYaml = require('read-yaml');
readYaml('config.yml', function(err, data) {
if (err) throw err;
console.log(data);
});
Read yaml file synchronously and parse content as JSON.
Params
* filepath {String}: Path of the file to read.options
* {Object|String}: to pass to js-yaml.returns
* {Object}: JSON
Example
`js`
var read = require('read-yaml');
var config = read.sync('config.yml');
* copy: Copy files or directories using globs. | homepage
* read-data: Read JSON or YAML files. | homepage
* write: Write files to disk, creating intermediate directories if they don't exist. | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
| Commits | Contributor |
| --- | --- |
| 15 | shinnn |
| 10 | jonschlinkert |
_(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)_
To generate the readme, run the following command:
`sh`
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
`sh``
$ npm install && npm test
Jon Schlinkert
* github/jonschlinkert
* twitter/jonschlinkert
Copyright © 2017, Jon Schlinkert.
Released under the MIT License.
*
_This file was generated by verb-generate-readme, v0.4.3, on April 02, 2017._