web-stream-kit
    Preparing search index...

    Class NDJsonParseStream<T>

    A TransformStream that parses individual lines of text into structured JSON values. Automatically ignores empty lines and comments/keep-alive entries.

    const parsedStream = lineStream.pipeThrough(
    new NDJsonParseStream<LogEntry>()
    );

    Type Parameters

    • T = unknown

      The expected output type after parsing.

    Hierarchy

    • TransformStream<string, T>
      • NDJsonParseStream
    Index
    • Constructs a new NDJsonParseStream.

      Type Parameters

      • T = unknown

        The expected output type after parsing.

      Parameters

      • options: NDJsonParseOptions = {}

        Optional parser settings, including a JSON reviver function.

      Returns NDJsonParseStream<T>

    readable: ReadableStream<T>

    The readable read-only property of the TransformStream interface returns the ReadableStream instance controlled by this TransformStream.

    MDN Reference

    writable: WritableStream<string>

    The writable read-only property of the TransformStream interface returns the WritableStream instance controlled by this TransformStream.

    MDN Reference