https://github.com/bpmn-io/ids
Simple id generation and caching
https://github.com/bpmn-io/ids
generator id javascript
Last synced: 3 months ago
JSON representation
Simple id generation and caching
- Host: GitHub
- URL: https://github.com/bpmn-io/ids
- Owner: bpmn-io
- License: mit
- Created: 2014-08-04T11:18:31.000Z (about 11 years ago)
- Default Branch: main
- Last Pushed: 2023-07-17T06:37:39.000Z (about 2 years ago)
- Last Synced: 2025-05-15T18:50:40.665Z (5 months ago)
- Topics: generator, id, javascript
- Language: JavaScript
- Homepage:
- Size: 666 KB
- Stars: 7
- Watchers: 13
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ids
[](https://github.com/bpmn-io/ids/actions/workflows/CI.yml)
A simple caching id generation utility.
## Usage
```javascript
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](http://npmjs.org):
```
npm install --save ids
```## License
Use under the terms of the [MIT license](http://opensource.org/licenses/MIT).