UserID

UserID

npm version Code Climate Test Coverage Issue Count Donate

Unique user ID generator.

Build

The repository contains pre-compiled files, but if you want to add your files and compile, then run the following commands in the repository folder.

  • npm install
  • npm run production

or

  • npm run development

The build required NodeJs version 6 or higher.

Usage

import UserID from "UserID.ts";

let ID = (new UserID()).getID();

or

let UserID = required("UserID.js");

let ID = (new UserID()).getID();

Note that when you first start the module it needs some time to calculate finally UID.

So initialize it in the first time as early as possible in the code.

Podívat a zanechat komentář