Pipe streams to /dev/null

npm install dev-null-stream
3 downloads in the last week
3 downloads in the last month

Dev Null Stream

Pipe the output of a stream to /dev/null


Build Status Dependency Status Code Climate


npm install -S dev-null-stream


Create an instance of Stringify and pipe a readable stream of objects into that instance

var fs = require('fs')
var DevNullStream = require('dev-null-stream')
var opts = {
  highWaterMark: 2
// devNullStream is an instance of require('stream').Transform
var devNullStream = new DevNullStream(opts) // opts is optional

var readStream = fs.createReadStream('/path/to/a/file.txt') // a readable stream of some sort
devNull.on('finish', function() {
  console.log('finish event called, all objects stringified')
npm loves you