Package Exports
- pull-abortable
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 (pull-abortable) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
pull-abortable
a pull-stream that may be aborted from the outside.
example
var pull = require('pull-stream')
var Abortable = require('pull-abortable')
var abortable = Abortable()
pull(
source,
abortable,
sink
)
//at any time you can abort the pipeline,
//the source will be cleaned up, and any
//error will be passed to the sink next time it reads.
atAnyTime(function () {
abortable.abort()
})
// abort the stream and end with an error
abortable.abort(new Error('example'))
License
MIT