Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Base64.Decoder

import { Base64 } from "https://raw.githubusercontent.com/i-xi-dev/base64.es/4.1.13/mod.ts"; 

const { Decoder } = Base64;

Base64 decoder

@example
const decoder = new Base64.Decoder();

decoder.decode("AwIBAP/+/fw=");
// → Uint8Array[ 0x03, 0x02, 0x01, 0x00, 0xFF, 0xFE, 0xFD, 0xFC ]
@example
const rfc4648urlOptions = Base64.Options.RFC4648URL;
const decoder = new Base64.Decoder(rfc4648urlOptions);

decoder.decode("AwIBAP_-_fw");
// → Uint8Array[ 0x03, 0x02, 0x01, 0x00, 0xFF, 0xFE, 0xFD, 0xFC ]
class Decoder implements [BytesEncoding.Decoder] {
constructor(options?: Options);
decode(encoded: string): Uint8Array;
}

§Implements

§
[BytesEncoding.Decoder]
[src]

§Constructors

§
new Decoder(options?: Options)
[src]
@param options

The Base64.Options dictionary.

§Methods

§
decode(encoded: string): Uint8Array
[src]

Decodes a Base64-encoded string into an Uint8Array.

@param encoded

The string to decode.

@return

An Uint8Array containing the decoded byte sequence.