Base64.toBytes
Decodes a Base64-encoded string (with optional padding and/or URL-safe characters) to Bytes.Bytes
.
Imports
Named
import { Base64 } from 'ox'
Examples
import { Base64, Bytes } from 'ox'
const value = Base64.toBytes('aGVsbG8gd29ybGQ=')
Uint8Array([104, 101, 108, 108, 111, 32, 119, 111, 114, 108, 100])
Definition
function toBytes(
value: string,
): Bytes.Bytes
Source: src/Base64.ts
Parameters
value
- Type:
string
The string, hex value, or byte array to encode.
Return Type
The Base64 decoded Bytes.Bytes
.
Bytes.Bytes