Skip to content

krikus/heartbeat-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HeartBeat Stream

HeartBeat stream will slow down chunks when number of them is below bufferSize.

constructor (inherits from Duplex) takes object with following options:

  • bufferSize - threshold of items
  • delay - each element below will be emitted with every delay milliseconds

Usage

const readableStream = /*...*/
const writeStream = /*...*/
const heartBeatStream = new HeartBeatStream({ bufferSize: 1000, delay: 1000 })

readableStream
    .pipe(heartBeatStream)
    .pipe(writeStream)

Build Status

Build Status

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published