JSPM

dev-null

0.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 498802
  • Score
    100M100P100Q222960F
  • License

/dev/null for node streams

Package Exports

  • dev-null

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (dev-null) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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