npm.io
3.0.2 • Published 4 months ago

ids

Licence
MIT
Version
3.0.2
Deps
0
Size
8 kB
Vulns
0
Weekly
0
Stars
7

ids

Build Status

A simple caching id generation utility.

Usage

import { Ids } from 'ids';

const ids = new Ids();

const next = ids.next(); // returns id

ids.claim('f71a81'); // claim id as already existing

ids.assigned('f71a81'); // true if id was already generated / claimed

Get the library

Fetch it via npm:

npm install --save ids

License

Use under the terms of the MIT license.

Keywords