pull-stream-function-to-object
v1.0.1
Published
Converts a pull-stream function into an equivalent object form.
Downloads
10
Readme
Converts a pull-stream function into an equivalent object form.
Additional methods on the function are also present on the object with their 'this' parameter bound to the original function.
Useful when you want to access the source and/or the sink directly, or when you do not want to deal with both object and function forms.
var pull = require('pull-stream')
var toObject = require('pull-stream-function-to-object')
var drain = toObject(pull.drain())
pull(
pull.count(10),
drain.sink,
)