1.0.0 • Published 4 years ago

@jacobbubu/pull-hang v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

@jacobbubu/pull-hang

Build Status Coverage Status npm

Written pull-hang in TypeScript.

pull-hang

a pull-stream source that does nothing until you abort it.

import Hang from 'pull-hang'

const hang = Hang()
pull(
  hang
  pull.collect(function (err) {
    //this will never callback, until you call hang(true, cb)
  })
)

//abort the stream after a timeout.
setTimeout(function () {
  hang(true, function () {})
}, 100)

License

MIT