Package Exports
- stream-forward
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 (stream-forward) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
stream-forward
Forward events to the next stream in the pipeline.
Use
$ npm install --save stream-forwardvar streamForward = require('stream-forward');Example
var streamForward = require('stream-forward');
var request = require('request');
streamForward(request('http://yahoo.com'), 'response')
.pipe(process.stdout)
.on('response', function (response) {
// `response` from the request stream.
});Note: don't neglect proper event handling on the individual parts of your stream. This is just a convenience when you have to manually listen and re-emit events across a pipe.
streamForward(stream, eventNames)
stream
The source stream to spy on.
eventNames
Type: String, Array
Event names to watch and re-emit on attached streams.