fancy-ids

0.1.0 • Public • Published

Fancy-ids

Generates human-readable strings composed of english words, based on numbers. The calculation is fully reversible, so for example:

> f.fancyId(900000)
'Is-Year-Automatically-Different'
> f.fancyId('Is-Year-Automatically-Different')
900000

In other words, it is guaranteed that fancyId(fancyId(n)) === n.

The intended use-case is to use these on the user-facing end in for example urls where you have a database id as part of your url. So https://mysite.com/items/Is-Recipe-Primarily-Embarrassed instead of https://mysite.com/items/12387632.

Readme

Keywords

none

Package Sidebar

Install

npm i fancy-ids

Weekly Downloads

3

Version

0.1.0

License

ISC

Last publish

Collaborators

  • fhaglund