Function: decodeBase64()
ts
function decodeBase64(b64: string): Uint8Array;Defined in: src/lib/helpers/base64.ts:57
Decode a base64 string back into a Uint8Array.
Parameters
| Parameter | Type | Description |
|---|---|---|
b64 | string | The base64 string to decode. |
Returns
Uint8Array
The decoded bytes.
Remarks
Inverse of encodeBase64. Prefers Buffer.from(b64, 'base64') when globalThis.Buffer exists; otherwise decodes through atob byte-by-byte.