Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
silently tap into a stream
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
main.js
package.json
readme.md
test.js

readme.md

streamtap

Tap into a stream. Read-only and drop data instead of applying backpressure

Useful for "monitoring" a stream

Example

var fs = require('fs')
var http = require('http')
var Stream = require('stream')
Stream.prototype.tap = require('streamtap')

http.get({
    host: 'google.com',
    port: 80,
    path: '/index.html'
},
function (res) {
    res
    .tap(process.stdout)
    .pipe(fs.createWriteStream('index.html'))
})

Testing

$ npm test

License

MIT

Something went wrong with that request. Please try again.