validate

import { validate } from "jsr:@ende/uuid/v3";

function

function validate(id: string): boolean

Determines whether a string is a valid UUIDv3.

id: string

UUID value.

Returns

true if the string is a valid UUIDv3, otherwise false.

Example: Usage

import { validate } from "@ende/uuid/v3";
import { assert, assertFalse } from "@ende/assert";

assert(validate("22fe6191-c161-3d86-a432-a81f343eda08"));
assertFalse(validate("this-is-not-a-uuid"));

Source