magic-token
A package to generate unique token, that can be used as identifier or to store data.
Features
- Generates 32 characters long token
- Always unique with accuracy rate of upto 1M tokens per second
- Secure data storage if secret is provided
How to use
Save package
npm i --save magic-token
Use only token
const magicToken = ;const token = magicToken;
Use token and store data
- Default storage is file system to store data of token.
const magicToken = ;const token = magicToken;const store = magicToken; //Set data for the tokenstore; //Get data for the tokenstore; //or store; //Deletes data from the tokenstore; //or store;
License
MIT