arindam-unique-token
1.0.0 • Public • Published
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);
}
npm i arindam-unique-token
const token = require('arindam-unique-token');
console.log(token.uniqueToken());
Package Sidebar
Install
npm i arindam-unique-token
Weekly Downloads