You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iotcat 74338fbb93 auto update 5 years ago
..
test auto update 5 years ago
LICENSE auto update 5 years ago
README.md auto update 5 years ago
duplex.js auto update 5 years ago
index.js auto update 5 years ago
package.json auto update 5 years ago
sink.js auto update 5 years ago
source.js auto update 5 years ago
through.js auto update 5 years ago

README.md

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