Package Exports
- @vandeurenglenn/base32
- @vandeurenglenn/base32/dist/base32.js
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 (@vandeurenglenn/base32) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bs32
module compatible base32
Usage
import base32 from '@vandeurenglenn/base32'
const uint8Array = new TextEncoder().encode('hi')
const base32Encoded = base32.encode(uint8Array)
const base32HexEncoded = base32.encode(uint8Array, true)
console.log(base32Encoded) // 2dj
console.log(base32HexEncoded) // q39
const base32Decoded = base32.decode(base32Encoded)
const base32HexDecoded = base32.decode(base32HexEncoded, true)
const string = new TextDecoder().decode(base32Decoded)
const stringHex = new TextDecoder().decode(base32HexDecoded)
console.log(string) // hi
console.log(stringHex) // hi