Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/qwtel/uuid-class
A minimal UUID class for JavaScript.
https://github.com/qwtel/uuid-class
binary class javascript typedarray uint8array uuid uuids
Last synced: 25 days ago
JSON representation
A minimal UUID class for JavaScript.
- Host: GitHub
- URL: https://github.com/qwtel/uuid-class
- Owner: qwtel
- License: mit
- Created: 2020-02-14T17:43:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-26T12:55:12.000Z (over 2 years ago)
- Last Synced: 2024-09-30T06:15:19.818Z (about 1 month ago)
- Topics: binary, class, javascript, typedarray, uint8array, uuid, uuids
- Language: TypeScript
- Homepage: https://qwtel.com/uuid-class/
- Size: 248 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# UUID Class
A minimal UUID class for JavaScript.
UUIDs are represented as bytes (`Uint8Array`) and converted to strings on-demand.
This class implements `toString` and `toJSON` for better language integration, as well as inspection for node and Deno for a better development experience.
For the most part, a `UUID` instance can be used where a UUID string is expected, except equality checks.
For those cases, `UUID` provides quick access to the string representations via the `uuid` field.## Dependencies
The class is intended to be used in a variety of JS contexts, but expects the WebCryptography API to be implemented, specifically `crypto.getRandomValues`. It also expects `Uint8Array` to be available.It is written in ES2015 syntax and ES modules. However, it can be used in node via `require`.