variable / @typed/id

isUuid4

Tests whether a string is an RFC UUID version 4 value.

Package version
1.0.0-beta.13
Category
ID validation
Since
1.0.0

Import

import { isUuid4 } from "@typed/id";

Signatures

export declare const isUuid4: (value: string) => value is Uuid4;

Why

Runtime refinement restores trust after serialization has erased the TypeScript brand.

Ownership and lifetime

This pure predicate acquires no resources and retains no input.

Examples

import { isUuid4 } from "@typed/id/Uuid4"
isUuid4("550e8400-e29b-41d4-a716-446655440000")

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source