JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 49
  • Score
    100M100P100Q85203F
  • License MIT

A minimal UUID class for JavaScript

Package Exports

  • uuid-class

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (uuid-class) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

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.