1.0.0 • Published 9 years ago
through-timeout v1.0.0
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
1.0.0
9 years ago