From 3dfabfa17d89bd6bd18f64642377720159308f0e Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 22 Nov 2023 09:07:33 +0000 Subject: [PATCH] fix: length-prefixed stream pass opts to byte stream (#107) To allow controlling unwrapped output pass opts to the underlying byte stream. --- packages/it-length-prefixed-stream/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/it-length-prefixed-stream/src/index.ts b/packages/it-length-prefixed-stream/src/index.ts index 33e2d9f4..f8427e40 100644 --- a/packages/it-length-prefixed-stream/src/index.ts +++ b/packages/it-length-prefixed-stream/src/index.ts @@ -80,7 +80,7 @@ const defaultLengthDecoder: lp.LengthDecoderFunction = (buf) => { defaultLengthDecoder.bytes = 0 export function lpStream > (duplex: Stream, opts: Partial = {}): LengthPrefixedStream { - const bytes = byteStream(duplex) + const bytes = byteStream(duplex, opts) if (opts.maxDataLength != null && opts.maxLengthLength == null) { // if max data length is set but max length length is not, calculate the