@dephub/base64
v1.0.1
Published
Simple Base64 encoding and decoding utilities for Node.js and browsers
Maintainers
Readme
@dephub/base64
Encode. Decode. Simplified.
@dephub/base64 — a utility for encoding UTF-8 strings to Base64 and decoding Base64 back to UTF-8.
Features ✨
- 🔹 Simple API:
encode()anddecode()functions - 🚀 CLI support: encode/decode directly from the terminal
- 🔄 Reliable Base64 encoding/decoding — handles all UTF-8 characters correctly
- 🌐 Cross-environment — works in Node.js and modern browsers
- ⚡ Fast performance — minimal and efficient Base64 operations
Installation 💿
# Using npm
npm install @dephub/base64
# Using pnpm
pnpm add @dephub/base64
# Using yarn
yarn add @dephub/base64Usage 📦
API </>
import { encode, decode } from '@dephub/base64';
const encoded = encode('hello');
console.log(encoded); // "aGVsbG8="
const decoded = decode(encoded);
console.log(decoded); // "hello"CLI 🖥️
# Encode string
base64 encode "hello"
# Output: aGVsbG8=
# Decode string
base64 decode "aGVsbG8="
# Output: hello
# Show help
base64 --helpCommands:
encode <string> : Encode string to Base64
decode <base64> : Decode Base64 to string
--help : Show help message
--version : Show versionLicense 📄
MIT License – see LICENSE for details.
Author: Estarlin R (estarlincito.com)
