variable / @typed/id/Ulid

isUlid

Tests whether a string is a canonical ULID.

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

Import

import { isUlid } from "@typed/id/Ulid";

Signatures

export declare const isUlid: (value: string) => value is Ulid;

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 { isUlid } from "@typed/id/Ulid"
isUlid("01ARZ3NDEKTSV4RRFFQ69G5FAV")

Other public imports

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

Source