Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/justaos_utils/packages/common-utils/deps.ts>uuid.v3.validate

Common utility functions used across projects
Go to Latest
function uuid.v3.validate
import { uuid } from "https://deno.land/x/justaos_utils@v1.9.0/packages/common-utils/deps.ts";
const { validate } = uuid.v3;

Validate that the passed UUID is an RFC4122 v3 UUID.

Examples

Example 1

import { generate, validate } from "https://deno.land/std@0.224.0/uuid/v3.ts";

validate(await generate("6ba7b811-9dad-11d1-80b4-00c04fd430c8", new Uint8Array())); // true
validate(crypto.randomUUID()); // false
validate("this-is-not-a-uuid"); // false

Parameters

id: string

Returns

boolean