Skip to main content

UUID

A random version-4 UUID from the platform's cryptographic random source. Not the same thing as Unique Id.

UUID emits a standard RFC 4122 version-4 identifier — 36 characters, 122 random bits — generated once when the node is created and again on every New. It uses crypto.randomUUID where that exists and builds the same layout from crypto.getRandomValues where it does not (a browser on a non-secure origin), so it is never weaker, only differently reached. It is deliberately a second node beside Unique Id rather than a replacement: Unique Id is 10 characters from Math.random(), which is right for keying a rendered list and wrong for a record id, an idempotency key or anything an attacker might try to guess.

When to use it

A record id, an idempotency key, a correlation id across services, a filename that must not collide. Anywhere the id leaves this page or has to be unguessable.

At a glance

CategoryUtilities
Type namenet.noodl.UUID
Available inbrowser, cloud
SSR compatibilitysafe
Provided bynoodl-runtime

Inputs

Signals

NameTypeDefaultDescription
generateSignalGenerates a fresh UUID, replacing the one on Id

Outputs

Values

NameTypeDefaultDescription
uuidStringA random version-4 UUID, generated once when the node is created and again on every New. Use this rather than Unique Id wherever the id has to be globally unique or unguessable

Signals

NameTypeDefaultDescription
completedSignalFires after every invocation, whatever the outcome — wire this to carry on regardless. Failure still fires and still carries its reason, so this cannot hide an error
doneSignalFires once a new UUID is available on Id

Failure outputs

NameTypeDefaultDescription
errorStringWhy no UUID could be generated
failureSignalFires when there is no cryptographic random source here, leaving Id as it was

Patterns

  • Create Record with Id wired from this node: an id minted client-side lets the same request be retried safely.

Watch out for

  • Using Unique Id where this node is meant. Ten characters of Math.random() is not an identifier to key a database on.

Unique Id, Random Bytes

Generated

This page is generated from node-catalog-enriched.json. Do not edit it by hand — run npm run docs:nodes to regenerate, and fix the source enrichment instead.