1.0.0 • Published 2 years ago
@t-bowersox/base64 v1.0.0
Base64
A base64 encoder and decoder utility for Node. Use this to easily convert a UTF-8 string to Base64 and back again.
Installation
npm i @t-bowersox/base64
Usage
Encode a UTF-8 string to Base64
import { Base64 } from "@t-bowersox/base64";
const base64Str = Base64.encode("hello world");
console.log(base64str); // "aGVsbG8gd29ybGQ="
Decode a Base64 string to UTF-8
import { Base64 } from "@t-bowersox/base64";
const utf8Str = Base64.decode("aGVsbG8gd29ybGQ=");
console.log(utf8str); // "hello world"
1.0.0
2 years ago