pull-abortable
a pull-stream which may be aborted
Last updated 4 years ago by dominictarr .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pull-abortable 
SYNC missed versions from official npm registry.

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

Current Tags

  • 4.1.1                                ...           latest (4 years ago)

8 Versions

  • 4.1.1                                ...           4 years ago
  • 4.1.0                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 3.0.0                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.1.1                                ...           6 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago

Copyright 2014 - 2016 © taobao.org |