@peerbit/stream 4.3.10-ad698f7 → 4.3.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/index.d.ts +18 -52
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +83 -377
- package/dist/src/index.js.map +1 -1
- package/dist/src/pushable-lanes.d.ts +0 -6
- package/dist/src/pushable-lanes.d.ts.map +1 -1
- package/dist/src/pushable-lanes.js +1 -3
- package/dist/src/pushable-lanes.js.map +1 -1
- package/package.json +95 -95
- package/src/index.ts +114 -434
- package/src/pushable-lanes.ts +1 -7
package/src/pushable-lanes.ts
CHANGED
|
@@ -70,10 +70,6 @@ export interface Options {
|
|
|
70
70
|
* How many lanes, lane 0 is fastest and will drain before lane 1 is consumed
|
|
71
71
|
*/
|
|
72
72
|
lanes?: number;
|
|
73
|
-
/**
|
|
74
|
-
* Optional hook invoked on every successful push with the value and lane
|
|
75
|
-
*/
|
|
76
|
-
onPush?(value: { byteLength: number }, lane: number): void;
|
|
77
73
|
}
|
|
78
74
|
|
|
79
75
|
export interface DoneResult {
|
|
@@ -260,9 +256,7 @@ function _pushable<PushType extends Uint8Array, ValueType, ReturnType>(
|
|
|
260
256
|
return pushable;
|
|
261
257
|
}
|
|
262
258
|
|
|
263
|
-
|
|
264
|
-
options?.onPush?.(value, lane);
|
|
265
|
-
return out;
|
|
259
|
+
return bufferNext({ done: false, value }, lane);
|
|
266
260
|
};
|
|
267
261
|
const end = (err?: Error): ReturnType => {
|
|
268
262
|
if (ended) return pushable;
|