https://github.com/litert/uuid.js
A uuid generator library for NodeJS.
https://github.com/litert/uuid.js
guid javascript snowflake uuid uuidv4 uuidv5
Last synced: 4 months ago
JSON representation
A uuid generator library for NodeJS.
- Host: GitHub
- URL: https://github.com/litert/uuid.js
- Owner: litert
- License: apache-2.0
- Created: 2018-05-06T09:59:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-08-24T03:21:23.000Z (12 months ago)
- Last Synced: 2025-10-27T22:33:53.694Z (9 months ago)
- Topics: guid, javascript, snowflake, uuid, uuidv4, uuidv5
- Language: TypeScript
- Homepage: https://litert.org/projects/uuid.js
- Size: 118 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# LiteRT/UUID
[](https://www.typescriptlang.org)
[](https://www.npmjs.com/package/@litert/uuid "Stable Version")
[](https://github.com/litert/uuid/blob/master/LICENSE)
[](https://nodejs.org/dist/latest-v8.x/)
[](https://github.com/litert/uuid.js/issues)
[](https://github.com/litert/uuid.js/releases "Stable Release")
A uuid generator library for NodeJS.
## Requirement
- TypeScript v5.0.0 (or newer)
- Node.js v18.0.0 (or newer)
## Installation
Install by NPM:
```sh
npm i @litert/uuid --save
```
## Documents
- [English](https://litert.org/projects/uuid.js)
## Algorithms
- [Snowflake](https://blog.twitter.com/engineering/en_us/a/2010/announcing-snowflake.html)
A 64-bit integer UUID algorithm provided by X (Twitter).
- [Snowflake-SI](./docs/en-US/Snowflake-SI.md)
The Snowflake-SI algorithm generates safe integer (53-bits integer) for
JavaScript, with capacity 128 uuids per milliseconds, and 64 machine parallel
working.
- UUIDv4
The UUID version 4 algorithm generates random UUIDs.
- UUIDv5
The UUID version 5 algorithm generates UUIDs based on SHA-1 hash of a namespace and a name.
## Examples
- [Snowflake](./src/examples/Snowflake.ts)
- [Snowflake-SI](./src/examples/SnowflakeSI.ts)
- [UUIDv4](./src/examples/UUIDv4.ts)
- [UUIDv5](./src/examples/UUIDv5.ts)
## License
This library is published under [Apache-2.0](./LICENSE) license.