edgeport - v1.0.3
    Preparing search index...

    Function fromBase64

    • Decodes a base64 string into bytes.

      Tolerant of input variation: a leading data:...;base64, prefix is stripped, both the standard and URL-safe alphabets are accepted, and missing = padding is restored before decoding.

      Parameters

      • input: string

        The base64 (or base64url, or data-URI) string.

      Returns Uint8Array

      The decoded bytes.

      If the input is not valid base64.

      1.0.3

      import { fromBase64 } from 'edgeport/util';

      new TextDecoder().decode(fromBase64('aGk-Pw')); // 'hi>?'