Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
yaml-document-stream
Advanced tools
This is parser/generator for YAML containing multiple documents as streams.
npm -i yaml-document-stream
js-yaml is a peer dependency, make sure to add it also if not installed already.
Convert YAML stream, to stream of parsed objects
// See example.read.js for full source
fs.createReadStream('file.yaml').pipe(
new YamlStreamReadTransformer()
)
Convert stream of objects, to YAML multi-document
// See example.write.js for full source
stream.Readable.from([{d:1}, {d:2}], {
objectMode: true,
}).pipe(
new YamlStreamWriteTransformer()
).pipe(
process.stdout
)
This is not a full streaming parser for YAML, only splitting documents is done in streaming fashion, the single document parsing is done via js-yaml
FAQs
Work with multi-document YAML as stream
The npm package yaml-document-stream receives a total of 161 weekly downloads. As such, yaml-document-stream popularity was classified as not popular.
We found that yaml-document-stream 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.