uuid-class
TypeScript icon, indicating that this package has built-in type declarations

0.13.0-alpha.1 • Public • Published

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.

Package Sidebar

Install

npm i uuid-class

Weekly Downloads

59

Version

0.13.0-alpha.1

License

NOASSERTION

Unpacked Size

26.1 kB

Total Files

11

Last publish

Collaborators

  • qwtel