drop-stream

1.0.0 • Public • Published

drop-stream Build Status Build status Coverage Status XO code style

A Duplex stream which discards all chunks passed through.

Install

$ npm install drop-stream --save

Usage

const DropStream = require('drop-stream');
const fs = require('fs');
 
fs.createReadStream('todo.txt')
    .pipe(new DropStream())
    .pipe(fs.createWriteStream('done.txt'))
    .on('finish', () => {
        // => done.txt is empty
    });

API

Class: DropStream

Drop streams are Transform streams.

new DropStream([options])

options

Type: Object

stream.Transform options.

DropStream#obj([options])

A convenience wrapper for new DropStream({...options, objectMode: true}).

License

MIT © Michael Mayer

Package Sidebar

Install

npm i drop-stream

Weekly Downloads

257

Version

1.0.0

License

MIT

Last publish

Collaborators

  • schnittstabil