From 2cf30d5732ae3efb2a935797f7b7f61fba28a131 Mon Sep 17 00:00:00 2001 From: bbeck Date: Sat, 23 Sep 2023 01:30:06 -0700 Subject: [PATCH] add support for multiple delimiters and multibye delimiters to packet length parser --- docs/api-parser-packet-length.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/api-parser-packet-length.md b/docs/api-parser-packet-length.md index 99691fb..34e01d4 100644 --- a/docs/api-parser-packet-length.md +++ b/docs/api-parser-packet-length.md @@ -16,8 +16,10 @@ A transform stream that emits data after a delimiter and number of bytes is rece ```ts interface PacketLengthOptions extends TransformOptions { - /** delimiter to use defaults to 0xaa */ - delimiter?: number + /** delimiter(s) to use defaults to 0xaa */ + delimiter?: number | number[] + /** delimiter length in bytes defaults to 1 */ + delimiterBytes?: number /** overhead of packet (including length, delimiter and any checksum / packet footer) defaults to 2 */ packetOverhead?: number /** number of bytes containing length defaults to 1 */