@fdv/unid

3.0.0 • Public • Published

Unid

[Yet another] Unique, Safe, Integer ID Generator for Node.js

Usage

const unid = require('@fdv/unid');
const nextId = unid({ /* epoch: SOME_DATE, worker: SOME_ID */ });

nextId().then(id => console.log(id));

// or:
(async function () {
  const id = await nextId();
  // ...
})();

License

WTFPLv2

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @fdv/unid

      Weekly Downloads

      3

      Version

      3.0.0

      License

      WTFPL

      Unpacked Size

      4.58 kB

      Total Files

      5

      Last publish

      Collaborators

      • mohamadfadavi