A fast and flexible unique ID generator for JavaScript and TypeScript.
Project details
jet-id is an extremely fast unique ID generator designed for JavaScript and TypeScript applications. With features like optional timestamping, sorting, and a simple API, it provides a versatile solution for generating strong random IDs with minimal overhead. Ideal for developers seeking speed and efficiency.
jet-id is an extremely fast unique ID generator designed for both JavaScript and TypeScript, offering features that include optional sorting and timestamping. This library stands out with its exceptional speed and compact size, delivering 28-character IDs composed of 25 random characters formatted in Crockford base32 with a 9-5-5-6 grouping.
nanoid(), making it ideal for applications requiring rapid unique ID generation.jetId() or jetId.mono() generates IDs with 125 bits of randomness, surpassing the capabilities of UUID v4.import jetId from 'jet-id';
const id = jetId(); // Example output: '9Q8SWWBTY-7NVXM-FT9S6-XB4R3M'
const timedId = jetId.timed(); // Example output: '1KKNTQ2CN-606ZG-8VF48-76B6F3'
const monoId = jetId.mono(); // Example output: '1M308A0DM-PR0000-422PKHWX-THHP6B3G-DPQCJ4GCE'
import { jetKey } from 'jet-id';
const key = jetKey(); // Example output: 'YFC75GX2KY5W183FRZA4XDVZ6PYDJPQT7JMNH3N7ZXPQ8FCW3M4G'
The performance of jet-id is remarkable, as it demonstrates a median operation speed significantly higher compared to other libraries. For instance, jetId() can achieve over 80 million operations per second, making it a top choice for developers requiring efficient ID generation without sacrificing security or reliability.
In summary, jet-id is a comprehensive solution for unique ID generation in JavaScript and TypeScript, delivering speed, flexibility, and a simple API that caters to a variety of use cases.
Comments
0Start the conversation
Share the first comment.