1.0.0 • Published 1 year ago
arindam-unique-token v1.0.0
NPM - Package
A simple npm package to create a unique token
uniqueToken() {
return this._token() + this._timeStamp() + this._token();
},
_token() {
return Math.random().toString(36).slice(2);
},
_timeStamp() {
return (Date.now() + Math.random() + new Date().getUTCMilliseconds()).toString(36);
}
Install
npm i arindam-unique-token
Example
const token = require('arindam-unique-token');
console.log(token.uniqueToken());
Thank you!
1.0.0
1 year ago