throttle-obj-stream
v1.0.0
Published
an object stream that uses [lodash.throttle](https://lodash.com/docs/4.17.10#throttle) to reduce the number of events passing through the stream.
Downloads
2
Readme
throttle-obj-stream
an object stream that uses lodash.throttle to reduce the number of events passing through the stream.
example
reduces the number of messages sent from some noisyStream
to stdout
down to max 1/sec.
const throttleStream = require('throttle-obj-stream')
const pump = require('pump')
pump(
noisyStream,
throttleStream(1000),
process.stdout,
(err) => console.log('pipeline ended', err)
)