@quentinadam/base32
v0.1.4
Published
A simple library to encode and decode base32 strings
Downloads
127
Readme
@quentinadam/base32
A simple library to encode and decode base32 strings.
Optionnaly supports specifying the alphabet to use.
Usage
import * as base32 from '@quentinadam/base32';
base32.encode(new Uint8Array([102, 111, 111])); // returns 'MZXW6==='
base32.decode('MZXW6==='); // returns Uint8Array([102, 111, 111])
base32.encode(new Uint8Array([102, 111, 111]), { padding: false }); // returns 'MZXW6'