MCPcopy Create free account
hub / github.com/UnsignedInt8/LightSword / constructor

Method constructor

lib/speedstream.ts:18–24  ·  view source on GitHub ↗

* speed: KB/s

(speed: number)

Source from the content-addressed store, hash-verified

16 * speed: KB/s
17 */
18 constructor(speed: number) {
19 super()
20
21 if (speed < 1) throw Error('can be negative speed');
22
23 this.bytesPerSecond = speed * 1024;
24 }
25
26 _transform(chunk: Buffer, encoding, done: Function) {
27 let me = this;

Callers

nothing calls this directly

Calls 1

ErrorInterface · 0.85

Tested by

no test coverage detected