@adius/yaml2json

1.0.1 • Public • Published

YAML2JSON

A stream transformer to convert YAML to JSON.

Installation

npm install --save @adius/yaml2json

Usage

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)

Readme

Keywords

Package Sidebar

Install

npm i @adius/yaml2json

Weekly Downloads

333

Version

1.0.1

License

MIT

Unpacked Size

8.67 kB

Total Files

6

Last publish

Collaborators

  • adius