Very thin wrapper around js-yaml for directly reading in YAML files.
Installations
npm install read-yaml
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=0.10.0
Node Version
7.7.3
NPM Version
4.1.2
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
Download Statistics
Total Downloads
12,713,840
Last Day
2,248
Last Week
11,039
Last Month
51,305
Last Year
2,125,753
GitHub Statistics
27 Stars
29 Commits
11 Forks
4 Watching
1 Branches
3 Contributors
Bundle Size
171.42 kB
Minified
41.57 kB
Minified + Gzipped
Package Meta Information
Latest Version
1.1.0
Package Id
read-yaml@1.1.0
Size
2.93 kB
NPM Version
4.1.2
Node Version
7.7.3
Publised On
02 Apr 2017
Total Downloads
Cumulative downloads
Total Downloads
12,713,840
Last day
0.6%
2,248
Compared to previous day
Last week
-14.9%
11,039
Compared to previous week
Last month
-4%
51,305
Compared to previous month
Last year
-64.7%
2,125,753
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Dev Dependencies
3
read-yaml
![Linux Build Status](https://img.shields.io/travis/jonschlinkert/read-yaml.svg?style=flat&label=Travis)
Very thin wrapper around js-yaml for directly reading in YAML files.
Install
Install with npm:
1$ npm install --save read-yaml
API
readYaml
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
1var readYaml = require('read-yaml'); 2readYaml('config.yml', function(err, data) { 3 if (err) throw err; 4 console.log(data); 5});
.sync
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
1var read = require('read-yaml'); 2var config = read.sync('config.yml');
About
Related projects
- 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
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Contributors
Commits | Contributor |
---|---|
15 | shinnn |
10 | jonschlinkert |
Building docs
(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:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running tests
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:
1$ npm install && npm test
Author
Jon Schlinkert
License
Copyright © 2017, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.4.3, on April 02, 2017.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
Found 1/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 3 are checked with a SAST tool
Score
3
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More