Skip to content

Converts meanless ids to human readable strings, using a one way hash function and storing the state locally

License

Notifications You must be signed in to change notification settings

JakeElder/reversible-human-readable-id

Repository files navigation

Reversible-human-readable-id

Build Status Coverage Status

Takes a string, converts it to a 128 bit hash, converts the hash to a freindly name and stores the result in a key value pair locally. Making searching for both key value pair simple and easy.

Thanks to human-readable and docker for the assets and local for storing locally.

Installation

npm

npm install reversible-human-readable-id

yarn

yarn add reversible-human-readable-id

Example

Create name

getHR('9028j9ko39i53klf');
'swift-engelbart-grasshopper'

Fetch name

getHR('9028j9ko39i53klf');
'swift-engelbart-grasshopper'
getId('swift-engelbart-grasshopper');
'9028j9ko39i53klf'

About

Converts meanless ids to human readable strings, using a one way hash function and storing the state locally

Resources

License

Stars

Watchers

Forks

Packages

No packages published