Nuptial Predicament Mediation
Join us to discuss the challenges, solutions and best practices for in-house JavaScript code sharing. Tuesday, 12/17 at 10am PT/1pm ET.Sign up here »

dev-null

0.1.1 • Public • Published

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

Keywords

none

Install

npm i dev-null

DownloadsWeekly Downloads

62,726

Version

0.1.1

License

none

Last publish

Collaborators

  • avatar