Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
/dev/null for node streams
Branch: master
Failed to load latest commit information.
examples
test
.gitignore
.travis.yml telling travis to not test this in 0.8
LICENSE initial package
README.md
index.js tests, examples and docs
package.json

README.md

dev-null build status

/dev/null for node streams

Use it whenever you need to interrupt stream flow for instance if you want to log the state of a stream instead of its output.

// without devnull
var numbers = require('../test/fixtures/number-readable')

numbers({ to: 2 })
  .on('data', function (d) { console.log(d.toString()) });
// => 
// 0
// 1
// 2
// piping into devnull
var devnull = require('dev-null');
var numbers = require('../test/fixtures/number-readable');

numbers({ to: 2 })
  .pipe(devnull())
  .on('data', function (d) { console.log(d.toString()) });

// => (no output)

Installation

npm install dev-null

License

MIT

Something went wrong with that request. Please try again.