NdjsonParseStreamOptions
NdjsonParseStreamOptions =
object
Defined in: packages/format-ndjson/src/parse-stream.ts:7
Properties
Section titled “Properties”maxBufferSize?
Section titled “maxBufferSize?”
optionalmaxBufferSize?:number
Defined in: packages/format-ndjson/src/parse-stream.ts:16
Hard ceiling on undecoded retained text, in UTF-16 code units.
Distinct from maxLineLength: that is a grammar limit the decoder
reports as a recoverable error, this is the abuse backstop on how much a
producer may hand over before any of it is decodable. A single write larger
than this throws BufferOverflowError. Defaults to 1 MiB.
onError?
Section titled “onError?”
optionalonError?: (error) =>void
Defined in: packages/format-ndjson/src/parse-stream.ts:24
Called for a malformed or over-long line instead of erroring the stream.
Web Streams have no non-fatal error channel, so recovery has to be a policy the caller supplies. Omit it and the first bad line ends the stream.
Parameters
Section titled “Parameters”unknown
Returns
Section titled “Returns”void