@simonsinclair/n32
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

n32

Express numbers in a form that can be conveniently and accurately transmitted between humans and computers.

Install

npm i @simonsinclair/n32

Usage

const { default: n32 } = require('@simonsinclair/n32');

const randomNumber = 123456789;
const friendlyId = n32(randomNumber);

console.log(friendlyId);
'3nqk8n';

API

n32(number)

Returns a string.

number

Type: number.

The number to express.

Supported browsers

IE11, and all modern browsers.

Package Sidebar

Install

npm i @simonsinclair/n32

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

3.78 kB

Total Files

5

Last publish

Collaborators

  • simonsinclair