@utilify/core
Version:
Modern, strongly typed, and safe utility function library for JavaScript and TypeScript. Includes type checking, manipulation of arrays, objects, strings, dates, colors, numbers, regular expressions, and more. Compatible with Browser, Node.js, Deno, and B
9 lines • 444 B
TypeScript
/**
* Encodes a Uint8Array or ArrayBuffer as a base64 or base64url string.
* @param {Uint8Array|ArrayBuffer} input - The data to encode.
* @param {boolean} [urlSafe=false] - Whether to use base64url encoding.
* @returns {string} The encoded string.
* @throws {Error} If no encoder is available.
*/
export default function base64Encode(input: Uint8Array | ArrayBuffer, urlSafe?: boolean): string;
//# sourceMappingURL=base64Encode.d.ts.map