Neverending Plethora of Modules
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

json-duplex-stream

1.2.0 • Public • Published

json-duplex-stream

Build Status

Newline-separated JSON duplex stream

Install

$ npm i json-duplex-stream --save

Require

var JSONDuplexStream = require('json-duplex-stream');

Instantiate

var stream = JSONDuplexStream();

Pipe

Pipe input to stream.in and output from stream.out.

var stream = JSONDuplexStream();
in.pipe(stream.in).pipe(app).pipe(stream.out).pipe(out);

Handle protocol errors

stream.in.on('error', function(err) {
  // ...
});
 
stream.out.on('error', function(err) {
  // ...
});

License

MIT

Keywords

none

install

npm i json-duplex-stream

Downloadsweekly downloads

21

version

1.2.0

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar