non-empty-stream

1.0.0 • Public • Published

non-empty-stream

Passthrough stream that emits error if no data goes through it.

Usage

var nonEmptyStream = require('non-empty-stream');
 
source
  .pipe(nonEmptyStream())
  .on('error', function (error) {
    console.error(error);
  })
  .pipe(...);

API

nonEmptyStream(options)

Creates a passthrough stream that will emit an error if it is ended without any data passing through it.

options - Optional object containing options accepted by through2.

nonEmptyStream.obj(options)

Shortcut for nonEmptyStream({objectMode: true}).

Install

npm install non-empty-stream

license

MIT

Package Sidebar

Install

npm i non-empty-stream

Weekly Downloads

0

Version

1.0.0

License

MIT

Last publish

Collaborators

  • psalaets