fix(core): update

This commit is contained in:
Philipp Kunz 2023-11-13 19:12:23 +01:00
parent df0ddf04b3
commit 196fb6d396
3 changed files with 40 additions and 4 deletions

View File

@ -10,3 +10,41 @@ hi+wow
hi+wow hi+wow
hi+wow hi+wow
hi+wow hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow
hi+wow

View File

@ -3,6 +3,6 @@
*/ */
export const commitinfo = { export const commitinfo = {
name: '@push.rocks/smartstream', name: '@push.rocks/smartstream',
version: '3.0.24', version: '3.0.25',
description: 'simplifies access to node streams' description: 'simplifies access to node streams'
} }

View File

@ -59,11 +59,9 @@ export class SmartDuplex<TInput = any, TOutput = any> extends Duplex {
let canPushMore = true; let canPushMore = true;
while(this.backpressuredArray.data.length > 0 && canPushMore) { while(this.backpressuredArray.data.length > 0 && canPushMore) {
const nextChunk = this.backpressuredArray.shift(); const nextChunk = this.backpressuredArray.shift();
if (nextChunk) {
canPushMore = this.push(nextChunk); canPushMore = this.push(nextChunk);
} }
} }
}
private asyncWritePromiseObjectmap = new plugins.lik.ObjectMap<Promise<any>>(); private asyncWritePromiseObjectmap = new plugins.lik.ObjectMap<Promise<any>>();
// Ensure the _write method types the chunk as TInput and encodes TOutput // Ensure the _write method types the chunk as TInput and encodes TOutput