JSPM

base-32

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 715
  • Score
    100M100P100Q94578F
  • License ISC

Library to encode/decode strings or binary data in base32.

Package Exports

  • base-32

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 (base-32) 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 CircleCI

Library to encode/decode strings or binary data in base32. Note: This library uses the RFC 4648 Base32 alphabet.

Install

npm install base-32

Usage

Setup
const base32 = require('base-32').default;
Encoding Strings
const str = 'Encode this string';
base32.encode(str);
Output
IVXGG33EMUQHI2DJOMQHG5DSNFXGO===
Encoding Binary Data
const buf = new Buffer('this is a tést');
base32.encode(buf);
Output
ORUGS4ZANFZSAYJAOTB2S43U
Decoding
const encodedString = 'ORSXG5DJNZTQ====';
base32.decode(encodedString);
Output
testing

Methods

encode ⇒ String

Encodes a string or binary data in base32.

Param Type
input String | Buffer
decode ⇒ String

Decodes data encoded in base32.

Param Type
input String | Buffer