function decodeFrameData
Since 0.2.0
decodeFrameData(payload: EncodedPayload): string | Uint8Array

Decodes a payload received from the wire back into its local form.

Examples

Example 1

decodeFrameData({ data: 'AQID', binary: true }); // Uint8Array([1, 2, 3])

Parameters

The encoded payload

Return Type

string | Uint8Array

The original string or Uint8Array

Usage

import { decodeFrameData } from "common/src/index.ts";