Branded UUID types for Typescript.
Partially wraps the uuid package to produce branded strings for supported UUID versions, validated with regular expressions. Causes no runtime changes to the strings.
Supports version 4 UUIDs.
Any supported UUID version. This is a normal Javascript string type branded with a unique symbol indicating the UUID version it represents.
Same as UUID but for a specific UUID version.
Generate a version 4 UUID.
Type guard for the type UUID.
Check if a value of unknown type is a valid string representation of any supported UUID version.
Same as isUUID but for a specific UUID version.
Return a value of unknown type as an UUID if it is a valid string representation of any supported UUID type, otherwise return null.
(Replace X with number of any supported UUID version)
Same as asUUID but for a specific UUID version.
Same as asUUID but throws an error if the value is not a valid UUID.
(Replace X with number of any supported UUID version)
Same as expectUUID but for a specific UUID version.