@echecs/pgn - v5.0.0
    Preparing search index...

    Function stream

    • Stream-parse a PGN AsyncIterable or Web Streams ReadableStream, yielding one PGN object per game. Memory usage stays proportional to one game at a time.

      Parameters

      • input: StringReadableStream | AsyncIterable<string, any, any>

        Any AsyncIterable or ReadableStream (Node.js readable stream, fetch body piped through TextDecoderStream, etc.)

      • Optionaloptions: ParseOptions

        Optional. Pass onError to observe parse failures instead of silently skipping malformed games. Not called for truncated streams (input ending without a result token). Pass onWarning to observe spec-compliance issues (missing STR tags, move number mismatches, etc.).

      Returns AsyncGenerator<PGN>

      Use parse() instead, which already handles multi-game input. stream() will be removed in the next major version.