Skip to content
English

randomHex

randomHex(length, exists?): string

Defined in: src/util/RandomString.ts:117

length lowercase hex characters.

Deliberately not a randomString flag combination — af is a subset of the letters, not a class of its own. It is separate because W3C trace-context mandates this alphabet: a traceparent header carries [0-9a-f]{32} and [0-9a-f]{16}, and a peer rejects anything else.

exists is the optional collision check every helper here takes — draw again while it answers true. See ExistsPredicate.

number

ExistsPredicate

string