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

Base64.encode

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

const { encode } = Base64;

Encodes the specified byte sequence into a string.

@example
Base64.encode(Uint8Array.of(0x03, 0x02, 0x01, 0x00, 0xFF, 0xFE, 0xFD, 0xFC));
// → "AwIBAP/+/fw="
@example
const rfc4648urlOptions = Base64.Options.RFC4648URL;
Base64.encode(Uint8Array.of(0x03, 0x02, 0x01, 0x00, 0xFF, 0xFE, 0xFD, 0xFC), rfc4648urlOptions);
// → "AwIBAP_-_fw"
function encode(toEncode: Uint8Array, options?: Options): string;
§
encode(toEncode: Uint8Array, options?: Options): string
[src]

§Parameters

§
toEncode: Uint8Array
[src]

The byte sequence to encode.

§
options?: Options optional
[src]

The Base64.Options dictionary.

§Return Type

§
string
[src]

A string containing the Base64-encoded characters.