resumer-through2

1.0.0 • Public • Published

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.

browser support

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 boop

methods

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-through2

license

This source code is based on resumer which does the same job for through as this does of through2.

MIT

Package Sidebar

Install

npm i resumer-through2

Weekly Downloads

3

Version

1.0.0

License

MIT

Unpacked Size

6 kB

Total Files

8

Last publish

Collaborators

  • leichtgewicht