UNPKG

shelving

Version:

Toolkit for using data in JavaScript.

14 lines (13 loc) 901 B
import { type Bytes, type PossibleBytes } from "./bytes.js"; /** Encode a string or binary data to Base64 string. */ export declare function encodeBase64(input: PossibleBytes, pad?: boolean): string; /** Decode Base64 string to string (decodes Base64URL too). */ export declare function decodeBase64String(base64: string): string; /** Decode URL-safe Base64 string to byte sequence (decodes Base64URL too). */ export declare function decodeBase64Bytes(base64: string): Bytes; /** Encode a string or binary data to URL-safe Base64 */ export declare function encodeBase64URL(input: PossibleBytes, pad?: boolean): string; /** Decode a string from URL-safe Base64 (decodes Base64 too). */ export declare function decodeBase64URLString(base64: string): string; /** Decode URL-safe Base64 string to byte sequence (decodes Base64 too). */ export declare function decodeBase64URLBytes(base64: string): Bytes;