slows
v0.1.2
Published
delaying the flow of data at regular interval. in stream.
Downloads
13
Readme
slows
delaying the flow of data at regular interval. in stream.
see example
usage
var es = require('event-stream')
var delay = require('slows')
var stream = delay(1000)
stream.on('end', console.log.bind(console, '[end]'))
.pipe(es.stringify())
.pipe(process.stdout)
array.forEach(function (data) {
stream.write(data)
})
stream.end()
api
var stream = delay([capacity,] msec)
return delay stream
capacity
: limit the number of flow data at same time.msec
: time to be delayed.
test
npm run test
for browser
npm run testling
author
license
MIT