Package Exports
- @adius/yaml2json
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@adius/yaml2json) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
YAML2JSON
A stream transformer to convert YAML to JSON.
Installation
npm install --save @adius/yaml2jsonUsage
const Yaml2json = require('@adius/yaml2json')
fs
.createReadStream('path/to/some/file.yaml')
.pipe(new Yaml2json)
.pipe(new stream.Transform({
writableObjectMode: true,
transform: (chunk, encoding, done) =>
done(null, JSON.stringify(chunk) + '\n')
}))
.pipe(process.stdout)
.on('error', console.error)