1.0.0 • Published 9 years ago

through-timeout v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

through-timeout

Through stream that calls a cb when no data has been written after the first x seconds.

Example

var Timeout = require('through-timeout');

source
.pipe(Timeout({
  objectMode: true,
  duration: 10000 
}, function () {
  // oh no!
  source.destroy();  
}))
.pipe(destination);

API

Timeout({ duration, objectMode=false }, cb)

License

MIT