Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
YAML.node is a simple binding for LibYAML.
Make sure you're on Node.js 0.4 or 0.6, and have LibYAML headers installed. Then simply:
$ 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);
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
git clone https://github.com/stephank/yaml.node.git
cd yaml.node
npm install
npm test
FAQs
Bindings to libYAML
The npm package libyaml receives a total of 0 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.