JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 179713
  • Score
    100M100P100Q172879F
  • License MIT

Package Exports

  • base32-encode

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 (base32-encode) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Base32 Encode

Base32 encoder with support for multiple variants.

Installation

npm install --save base32-encode

Usage

const base32Encode = require('base32-encode')
const { buffer } = new Uint8Array([0x74, 0x65, 0x73, 0x74])

console.log(base32Encode(buffer, 'Crockford'))
//=> EHJQ6X0

console.log(base32Encode(buffer, 'RFC4648'))
//=> ORSXG5A=

console.log(base32Encode(buffer, 'RFC4648-HEX'))
//=> EHIN6T0=

API

base32Encode(buffer, variant)

  • buffer <ArrayBuffer>
  • variant <String>

Encode the data in buffer. variant should be one of the supported variants listed below.

See also