Express numbers in a form that can be conveniently and accurately transmitted between humans and computers.
npm i @simonsinclair/n32
const { default: n32 } = require('@simonsinclair/n32');
const randomNumber = 123456789;
const friendlyId = n32(randomNumber);
console.log(friendlyId);
'3nqk8n';
Returns a string.
Type: number
.
The number to express.
IE11, and all modern browsers.