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

x/pup/deps.ts>uuid.validate

Universal process manager built in Deno
Go to Latest
function uuid.validate
import { uuid } from "https://deno.land/x/pup@1.0.0-beta.25/deps.ts";
const { validate } = uuid;

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

import { validate } from "https://deno.land/std@0.224.0/uuid/mod.ts"

validate("not a UUID") // false
validate("6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b") // true

Parameters

uuid: string

Returns

boolean