bytefy
v0.0.1
Published
Simple UTF-8 <-> Base64 encoder/decoder for Node.js and browser
Downloads
12
Maintainers
Readme
Bytefy
Encode. Decode. Simplified.
Bytefy — a utility for encoding UTF-8 strings to Base64 and decoding Base64 back to UTF-8.
Features ✨
- 🔹 Simple static API:
Bytefy.encode()andBytefy.decode(). - 🚀 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 bytefy
# Using pnpm
pnpm add bytefy
# Using yarn
yarn add bytefyUsage 📦
API </>
import { Bytefy } from 'bytefy';
const encoded = Bytefy.encode('hello');
console.log(encoded); // "aGVsbG8="
const decoded = Bytefy.decode(encoded);
console.log(decoded); // "hello"CLI 🖥️
# Show version
bytefy --version
# Encode string
bytefy --encode "hello"
# Output: aGVsbG8=
# Decode string
bytefy --decode "aGVsbG8="
# Output: hello
# Show help
bytefy --helpFlags:
-v, --version : Show version
-e, --encode : Encode string to Base64
-d, --decode : Decode Base64 to string
-h, --help : Show help messageLicense 📄
MIT License – see LICENSE for details.
Author: Estarlin R (estarlincito.com)
