UNPKG

visionary-base64url

Version:

A lightweight, zero-dependency base64url converter for Node.js, web browsers, and worker environments. Safely encodes emojis and unicode into URL-safe base64.

19 lines (17 loc) 516 B
/** * Encodes a string as base64url * * @param input string to encode * @returns base64url-encoded string * @throws {Error} If input is not a string */ declare const encodeBase64Url: (input: string) => string; /** * Decodes a base64url-encoded string to plain text * * @param input base64url-encoded string to decode * @returns decoded plain text string * @throws {Error} If input is not a string */ declare const decodeBase64Url: (input: string) => string; export { decodeBase64Url, encodeBase64Url };