JSPM

base32codec

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q9449F
  • License ISC

Pure Javascript Base 32 Encoder/Decoder

Package Exports

  • base32codec

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 (base32codec) 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 Coder / Encoder

Installation:

npm install --save base32codec

How to import:

// Javascript
const base32codec = require('base32codec');

// ES6, e.g. in Vue.js
import 'base32codec';

Usage:

// Encode I70CJ8G1A35 and get it back
var encoded_4648 = base32codec.encode('I70CJ8G1A35'); // default to RFC4648 encoder
var decoded_4648 = base32codec.decode('JE3TAQ2KHBDTCQJTGU======'); // default to RFC4648 decoder

// Other modes supported
var encoded_hex = base32codec.encode('I70CJ8G1A35', 'hex'); // RFC4648_HEX encoder
var encoded_crockford = base32codec.encode('I70CJ8G1A35', 'crockford'); // Crockford encoder