1.0.0 • Published 5 years ago
resumer-through2 v1.0.0
resumer-through2
Return a through2 stream that starts out paused and resumes on the next tick,
unless somebody called .pause().
This module has the same signature as through2.
example
var resumer = require('resumer-through2');
var s = createStream();
s.pipe(process.stdout);
function createStream () {
var stream = resumer();
stream.push('beep boop\n');
return stream;
}$ node example/resume.js
beep boopmethods
var resumer = require('resumer-through2')resumer(options, write, flush)
Return a new through2 stream from options, write and end, which default to
pass-through .queue() functions if not specified.
The stream starts out paused and will be resumed on the next tick unless you
call .pause() first.
options, write and end get passed directly through to
through2.
install
With npm do:
npm install resumer-through2license
This source code is based on resumer which does the same job for through as this does of through2.
MIT
