@posaune0423/uuid256@0.1.3Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
posaune0423/uuid256uuid256: UUID v7 canonical ↔ uint256 bridge (lower 128 bits)
This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers




JSR Score
100%
Published
2 months ago (0.1.3)
default
U256ID SDK entrypoint.
f
asUuid
Asserts the given string is a UUID and returns it typed as Uuid.
f
asUuidV7
Asserts the given string is a UUID (v7) and returns it typed as Uuid.
f
generateUuid
Generates a random UUID.
f
generateUuidV7
Generates a standards-compliant UUID (v7) string.
f
isUuid
Type guard that checks whether the given string is a canonical RFC 4122 UUID (any version such as v1/v4/v7).
f
isUuidV7
Type guard for UUID (v7) specifically.
f
toCanonicalU256Hex
Converts a bigint to a canonical 256-bit hex string with a 0x prefix.
T
U256Hex
Canonical 256-bit hexadecimal string with 0x prefix.
f
u256ToUuid
Decodes the lower 128 bits of a 256-bit hex string into a UUID string.
T
Uuid
Canonical UUID string type.
f
uuidToU256
Encodes a UUID into a canonical 256-bit hex string.