Skip to content

shahradelahi/base32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

@se-oss/base32

CI NPM Version MIT License Install Size

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 world

Crockford

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.

About

πŸ”’ Base32 encoder and decoder for TypeScript/JavaScript, supporting both RFC 4648 and Crockford variants.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors