Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
A simple binding for LibYAML.
$ npm install libyaml
var YAML = require('libyaml');
There's a basic JSON-like API:
var documents = YAML.parse('Hello world!');
var data = YAML.stringify({ fancy: ['object', 'structure'] });
And also a fs
-like API:
YAML.readFile('myfile.yml', function(error, documents) {
/* ... */
});
var doc1 = { first: 'document' };
var doc2 = { another: 'doc' };
YAML.writeFile('myfile.yml', doc1, doc2, function(error) {
/* ... */
});
Including synchronous variants:
var documents = YAML.readFileSync('myfile.yml');
YAML.writeFileSync('myfile.yml', doc1, doc2);
git clone https://github.com/stephank/yaml.node.git
cd yaml.node
npm install
npm test
As of 0.1.0, the API immitates the JavaScript built-in JSON
parser for string handling, and the
Node.js built-in fs
-module for file I/O. Function names have changed as follows:
YAML.load ➞ YAML.parse
YAML.dump ➞ YAML.stringify
YAML.loadFile ➞ YAML.readFile
YAML.dumpFile ➞ YAML.writeFile
YAML.loadFileSync ➞ YAML.readFileSync
YAML.dumpFileSync ➞ YAML.writeFileSync
YAML.parse ➞ YAML.stream.parse
FAQs
Bindings to libYAML
The npm package libyaml receives a total of 13 weekly downloads. As such, libyaml popularity was classified as not popular.
We found that libyaml demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.