Base64 / binary data / UTF-8 strings utilities
It ensures that UTF-8 characters are used when encoding to Base64.
Based on code of: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding
import { encodeBase64 } from "apprt-core/base64";const base64str = encodeBase64("hello world");// base64str === "aGVsbG8gd29ybGQ=" Copy
import { encodeBase64 } from "apprt-core/base64";const base64str = encodeBase64("hello world");// base64str === "aGVsbG8gd29ybGQ="
import { decodeBase64 } from "apprt-core/base64";const str = decodeBase64("aGVsbG8gd29ybGQ=");// str === "hello world" Copy
import { decodeBase64 } from "apprt-core/base64";const str = decodeBase64("aGVsbG8gd29ybGQ=");// str === "hello world"
Base64 / binary data / UTF-8 strings utilities
It ensures that UTF-8 characters are used when encoding to Base64.
Based on code of: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding
Example: Encode string to Base64
Example: Decode Base64 string