kefir-node-stream

1.0.1 • Public • Published

kefir-node-stream

Make a Kefir observable from a node streams2 stream, with proper lazy read behavior.

Example usage

var fromNodeStream = require('kefir-node-stream');
var index = require('fs').createReadableStream(__filename);

fromNodeStream(index).log();

Output:

[stream] <value> <Buffer ....>
[stream] <end>

Specific behavior

When applicable, data will be moved along in a while loop synchronously. Deactivation will cause handler events to be unbound and prevent further reading from the source. Behavior when calling on a streams1 stream or a streams2 stream in flowing mode is undefined.

This package contains only dev dependencies, with Kefir as a peer dependency.

Package Sidebar

Install

npm i kefir-node-stream

Weekly Downloads

6

Version

1.0.1

License

ISC

Last publish

Collaborators

  • myndzi