src-stream
Wrap readable streams to turn them into passthrough streams.
Last updated 9 years ago by doowb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install src-stream 
SYNC missed versions from official npm registry.

src-stream NPM version Build Status

Wrap readable streams to turn them into passthrough streams.

Install with npm

$ npm i src-stream --save

Usage

var src = require('src-stream');

API

srcStream

Wrap a source stream to passthrough any data that's being written to it.

Params

  • stream {Stream}: Readable stream to be wrapped.
  • returns {Stream}: Duplex stream to handle reading and writing.

Example

var src = require('src-stream');

// wrap something that returns a readable stream
var stream = src(plugin());

fs.createReadStream('./package.json')
  .pipe(stream)
  .on('data', console.log)
  .on('end', function () {
    console.log();
    console.log('Finished');
    console.log();
  });

Related projects

  • duplexify: Turn a writeable and readable stream into a streams2 duplex stream with support for async… more
  • merge-stream: Create a stream that emits events from multiple other streams
  • stream-loader: create a read stream from a glob of files. can be used as a loader-cache… more
  • through2: A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

Author

Brian Woodward

License

Copyright © 2015 Brian Woodward Released under the MIT license.


This file was generated by verb-cli on July 14, 2015.

Current Tags

  • 0.1.1                                ...           latest (9 years ago)

2 Versions

  • 0.1.1                                ...           9 years ago
  • 0.1.0                                ...           9 years ago
Maintainers (2)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE