0.1.2 • Published 6 years ago

easy-concurrent-stream v0.1.2

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

EasyConcurrentStream

build status npm version Code Climate MIT License

Create concurrent transform stream from an asyncronous function.

How to use

Interface compatible with buildin stream.Transform https://nodejs.org/api/stream.html#stream_implementing_a_transform_stream

const Transform = require('easy-concurrent-stream').Transform;

const transform = new Transform({
  transform: function(chunk, encoding, callback) {
    async_function(chunk, function(data){
      callback(null, data);
    });
  },
  flush: function(callback) {
    // optionally
    // when remaining data has been flushed.
    callback();
  }
});
0.1.2

6 years ago

0.1.1

8 years ago

0.1.0

8 years ago

0.0.1

8 years ago