https://github.com/thlorenz/dev-null
  
  
    /dev/null for node streams 
    https://github.com/thlorenz/dev-null
  
        Last synced: 5 months ago 
        JSON representation
    
/dev/null for node streams
- Host: GitHub
 - URL: https://github.com/thlorenz/dev-null
 - Owner: thlorenz
 - License: mit
 - Created: 2013-09-10T10:08:14.000Z (about 12 years ago)
 - Default Branch: master
 - Last Pushed: 2017-06-12T08:12:25.000Z (over 8 years ago)
 - Last Synced: 2025-01-02T17:04:00.820Z (10 months ago)
 - Language: JavaScript
 - Homepage:
 - Size: 129 KB
 - Stars: 43
 - Watchers: 3
 - Forks: 3
 - Open Issues: 1
 - 
            Metadata Files:
            
- Readme: README.md
 - License: LICENSE
 
 
Awesome Lists containing this project
README
          # dev-null [](http://travis-ci.org/thlorenz/dev-null)
`/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.
```js
// without devnull
var numbers = require('../test/fixtures/number-readable')
numbers({ to: 2 })
  .on('data', function (d) { console.log(d.toString()) });
// => 
// 0
// 1
// 2
```
```js
// 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