@se-oss/base32
v1.0.0
Published
A simple base32 (RFC 4648 and Crockford) encoder and decoder.
Maintainers
Readme
@se-oss/base32
A simple base32 encoder and decoder supporting both RFC 4648 and Crockford variants.
📦 Installation
pnpm add @se-oss/base32📖 Usage
RFC 4648
import { decode, encode } from '@se-oss/base32';
const encoded = encode('hello world');
console.log(encoded); // NBSWY3DPEB3W64TMMQ======
const decoded = decode(encoded);
console.log(new TextDecoder().decode(decoded)); // hello worldCrockford
import { crockfordDecode, crockfordEncode } from '@se-oss/base32';
const encoded = crockfordEncode('hello world');
console.log(encoded); // D1JPRV3F41VPYWKCCG======
const decoded = crockfordDecode(encoded);
console.log(new TextDecoder().decode(decoded)); // hello world📚 Documentation
For all configuration options, please see the API docs.
🚀 Future Enhancements
- [ ] Implement Crockford's checksum feature.
🤝 Contributing
Want to contribute? Awesome! To show your support is to star the project, or to raise issues on GitHub
Thanks again for your support, it is much appreciated! 🙏
License
MIT © Shahrad Elahi and contributors.
