Skip to main content
Home

Built and signed on GitHub Actions

uuid256: UUID v7 canonical ↔ uint256 bridge (lower 128 bits)

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with 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.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.