@abcnews/base-36-text
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

base-36-text

Tools for encoding / decoding text to / from base36 strings.

Usage

As a CLI

Install globally with npm i -g @abcnews/base-36-text to use the b36t executable, or use npx:

npx @abcnews/base-36-text encode 'example text'
> 31ltulurfcfzwo4gm7o

npx @abcnews/base-36-text decode 31ltulurfcfzwo4gm7o
> example text

As a library (node or browser)

npm i @abcnews/base-36-text
import { encode, decode } from '@abcnews/base-36-text';

encode('example text');
// > 31ltulurfcfzwo4gm7o

decode('31ltulurfcfzwo4gm7o');
// > 'example text'

A browser usage example is included with this project. To try it:

git clone https://github.com/abcnews/base-36-text
cd base-36-text
npm run example

...then open the console in the browser window that opens, and try out b36t.encode() and b36t.decode().

Readme

Keywords

none

Package Sidebar

Install

npm i @abcnews/base-36-text

Weekly Downloads

88

Version

1.0.1

License

MIT

Unpacked Size

8.82 kB

Total Files

9

Last publish

Collaborators

  • ashkyd
  • jtfell
  • phocks
  • andrewkesper
  • drzax