std/uuid/mod.ts

Deno standard library
Go to Latest
import * as mod from "https://deno.land/std@0.152.0/uuid/mod.ts";

Generators and validators for UUIDs for versions v1, v4 and v5.

Consider using the web platform crypto.randomUUID for v4 UUIDs instead.

Based on https://github.com/kelektiv/node-uuid -> https://www.ietf.org/rfc/rfc4122.txt

Support for RFC4122 version 1, 4, and 5 UUIDs

This module is browser compatible.

Functions

Check if the passed UUID is the nil UUID.

Generates a RFC4122 v1 UUID (time-based).

Validates the UUID v1.

f
v4.generate
deprecated

Validate that the passed UUID is an RFC4122 v4 UUID.

Generate a RFC4122 v5 UUID (SHA-1 namespace).

Validate that the passed UUID is an RFC4122 v5 UUID.

Test a string to see if it is a valid UUID.

Detect RFC version of a UUID.

Interfaces

The options used for generating a v1 UUID.