Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Pipe streams to /dev/null
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.jshintrc
.travis.yml
README.md
index.js
makefile
package.json

README.md

Dev Null Stream

Pipe the output of a stream to /dev/null

NPM

Build Status Dependency Status Code Climate

Installation

npm install -S dev-null-stream

Usage

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
readStream.pipe(devNull)
devNull.on('finish', function() {
  console.log('finish event called, all objects stringified')
})
Something went wrong with that request. Please try again.