latency-stream

1.0.0 • Public • Published

latency-stream

A stream that can mimic network latency.

npm install latency-stream

Usage

const LatencyStream = require('latency-stream')

const latency = new LatencyStream(100) // add a 100ms of latency

someStream.pipe(latency).pipe(someDestination)

You can also set an interval of latency and it will pick a random number inbetween

const latency = new LatencyStream([100, 200]) // add between 100-200 ms of latency

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i latency-stream

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

2.81 kB

Total Files

5

Last publish

Collaborators

  • mafintosh