pull-defer
a deferred source, sink or through pull-stream
Last updated 6 years ago by dominictarr .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install pull-defer 
SYNC missed versions from official npm registry.

pull-defer

create a placeholder for a pull stream that won't start moving until later.

examples

pull-defer can be used with source, sinks and transform streams.

through

//create a deferred through stream
var deferred = require('pull-defer').through()

pull(
  input,
  deferred,
  output
)

//nothing will happen until deferred.resolve(stream) is called.
deferred.resolve(transform)

source

//create a deferred through stream
var deferred = require('pull-defer').source()

pull(
  deferred,
  output
)

//nothing will happen until deferred.resolve(stream) is called.
deferred.resolve(input)

sink

//create a deferred through stream
var deferred = require('pull-defer').sink()

pull(
  input,
  deferred
)

//nothing will happen until deferred.start(stream) is called.
deferred.resolve(output)

License

MIT

Current Tags

  • 0.2.3                                ...           latest (6 years ago)

7 Versions

  • 0.2.3                                ...           6 years ago
  • 0.2.2                                ...           9 years ago
  • 0.2.1                                ...           9 years ago
  • 0.2.0                                ...           9 years ago
  • 0.1.1                                ...           10 years ago
  • 0.1.0                                ...           10 years ago
  • 0.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (4)

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