drop-stream

A Duplex stream which discards all chunks passed through

Usage no npm install needed!

<script type="module">
  import dropStream from 'https://cdn.skypack.dev/drop-stream';
</script>

README

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