arindam-unique-token

1.0.0 • Public • Published

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!

Package Sidebar

Install

npm i arindam-unique-token

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

2.79 kB

Total Files

4

Last publish

Collaborators

  • devarindam