4.0.0 • Published 1 year ago
@ctrl/ts-base32 v4.0.0
ts-base32

Base32 encode and decode in typescript exported as both commonjs and tree shakeable modules. Support for RFC4648, RFC4648_HEX, and CROCKFORD base32 encoding. Mostly directly taken from LinusU's packages.
Demo: https://ts-base32.vercel.app
Install
npm install @ctrl/ts-base32
Use
import { base32Encode, base32Decode } from '@ctrl/ts-base32';
import { stringToUint8Array, uint8ArrayToString } from 'uint8array-extras';
console.log(base32Encode(stringToUint8Array('a')));
// 'ME======'
console.log(base32Encode(stringToUint8Array('a'), { padding: false }));
// 'ME'
console.log(base32Decode('ME======'));
// Uint8Array
console.log(uint8ArrayToString(base32Decode('ME======'))
// 'a'
See Also
base32-encode - https://github.com/LinusU/base32-encode
base32-decode - https://github.com/LinusU/base32-decode
uint8array-extras - https://github.com/sindresorhus/uint8array-extras
4.0.0
1 year ago
3.0.0
2 years ago
2.1.3
2 years ago
2.1.2
3 years ago
2.1.1
4 years ago
2.1.0
4 years ago
2.0.1
4 years ago
2.0.0
4 years ago
1.2.6
4 years ago
1.2.5
4 years ago
1.2.4
5 years ago
1.2.3
5 years ago
1.2.2
5 years ago
1.2.1
5 years ago
1.2.0
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
6 years ago
1.1.2
6 years ago
1.1.1
6 years ago
1.1.0
6 years ago
1.0.4
6 years ago
1.0.3
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago