Stone.js API
    Preparing search index...
    • Parse a raw WebSocket payload into a WsFrame.

      Accepts a string or anything stringifiable (a Buffer), and returns undefined on malformed JSON so the caller can treat it as a protocol error rather than crashing the socket.

      Parameters

      • data: unknown

        The raw payload.

      Returns WsFrame

      The parsed frame, or undefined.