mwg API
    Preparing search index...

    Function parseReplayEvents

    • Validates an already-parsed replay - the same { frame, action } checks deserializeReplay applies, for the callers that hold parsed JSON rather than a string: a replay-file envelope nests its events as an array, and re-stringifying them to parse them again would be the only reason this half could not exist.

      Parameters

      • parsed: unknown

      Returns ReplayEvent[]

      import { parseReplayEvents } from '@datamoc/mwg/core';

      const events = parseReplayEvents([{ frame: 3, action: 'confirm' }]);