1.0.1 • Published 3 years ago

@distrentic/base32 v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

base32

zero dependency base32 encoder/decoder based on rfc3548

Installation

npm install @distrentic/base32
yarn add @distrentic/base32

Usage

import base32 from "@distrenctic/base32";

const encoded = base32.toBase32("test");

console.log(encoded);
// => ORSXG5AA

console.log(base32.fromBase32(encoded).toString());
// => test

API

Methods

  • toBase32(< string | Uint8Array > input) - (string) - Encodes the data in input.

  • fromBase32(< string > input) - (string) - Decodes the base32 encoded data in input.

License

Licensed under MIT license (LICENSE or http://opensource.org/licenses/MIT)