drop-stream
v1.0.0
Published
A Duplex stream which discards all chunks passed through
Downloads
999
Maintainers
Readme
drop-stream
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