Package Exports
- @navico-mobile/base32
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@navico-mobile/base32) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Base 32 encoding/decoding for JavaScript
Base 32 is between hexadecimal notation and Base 64 encoding. It's intended to be a human-friendly -- you don't have to worry about punctuation, capitalization, or letters/numbers that are easy to confuse, making it easier to transmit in handwriting or over the phone.
This implementation contains a simplified encoding scheme customized for Navico and contains no external dependencies.
Getting started
In your shell, install with yarn:
yarn install https://github.com/navico-mobile/base32-javascript.gitIn your code:
const base32 = require('@navico-mobile/base32');
// simple api
const encoded = base32.encode('some data to encode');
const decoded = base32.decode(encoded);
// streaming api
this.encoder = new Base32.encoder();
this.dataCallback = function(chunk) {
this.emit(this.encoder(chunk));
}
this.closeCallback = function(chunk) {
this.emit(this.finish()); // flush any remaining bits
}
// easy sha1 hash
const hash = base32.sha1(some_data_to_hash); // DONE.License
Available under the MIT License.