consistent-ids
v0.6.1
Published
A randomly consistent (a-la-Stripe) hash generator
Downloads
5
Maintainers
Readme
hash-generator
A no dependency randomly consistent (a-la-Stripe) hash generator
Why?
// TODO
Installation
npm install consistent-ids --save
Or use yarn (I ❤️ yarn)
yarn add consistent-ids
Usage
#In Your .env file
HASH_KEY = SomeTrulyRandomKeyWhichCannotBeGuessedByAnyone
import IdGenerator from 'consistent-ids';
const generator = new IdGenerator(); // We'll take care of HASH_KEY for you
generator.generate('ord');
// => ord_1BVVs21TuBY1vZhGhN03ug5
generator.generate('cus');
// => cus_1BVVs21TuBY1vZhGhN0sKqd
FAQ
What for ? To be written
Contributors
Maintainer
Clément SAUVAGE
Contributors
License
MIT © Clément SAUVAGE