createULID

Generates a ULID, a 26-character unique identifier that sorts by creation time.

createULID([type] [, input1] [, input2]) → returns string

This function requires Lucee 6.0.1.65 and up.  Not supported on Adobe ColdFusion, etc.

Argument Reference

type string

monotonic makes each ULID greater than the last, even within the same millisecond. hash makes a repeatable ULID from input1 and input2. When omitted, a standard random ULID is generated.

input1 numeric

A number used to build the ULID. Only used when type is hash.

input2 string

A string used to build the ULID. Only used when type is hash.

Examples
Sample code invoking the createULID function

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub