Home Manual Reference Source

:fax:

@codec-bytes/base32

Base32 encoder/decoder for JavaScript. See docs. Parent is @codec-bytes/about.

import * as ascii from '@codec-bytes/ascii';
import * as base32 from '@codec-bytes/base32';
let bytes = ascii.encode('Hello!');
base32.decode(bytes); // 'JBSWY3DPEE======'
base32.decode(bytes, {variant: 'base32hex'}); // '91IMOR3F44======'
base32.decode(bytes, {variant: 'z-base-32'}); // 'jb1sa5dxrr'
base32.decode(bytes, {variant: 'crockford'}); // '91JPRV3F44'
base32.decode(bytes, {alphabet: 'BCDEFGHIJKLMNOPQRSTUVWXYZ234567A', padding: '.'}); // 'KCTXZ4EQFF......'

License Version Tests Dependencies GitHub issues Downloads

Code issues Code maintainability Code coverage (cov) Code technical debt Documentation Package size