@grimwoodent/uid

1.0.1 • Public • Published

UIDs generators

Examples

Queue

Generate number UIDs from 1

import { UID } from 'grim.lib';

const queue = new UID.Queue();

const first = queue.next; // 1
const second = queue.getNext(); // 2

Generator

Generate string UIDs (16 numbers or letters)

import { UID } from 'grim.lib';

const generator = new UID.Generator();

const uid = generator.generate(); // 9b2534ff20dab52f5dfdc3c88547e0bb

Package Sidebar

Install

npm i @grimwoodent/uid

Weekly Downloads

11

Version

1.0.1

License

MIT

Unpacked Size

7.77 kB

Total Files

10

Last publish

Collaborators

  • grimwoodent