$$uuid
Format and transform UUID
info
Input must be a UUID in standard string format (RFC 4122; with hyphens), can be used in conjunction with #uuid
Usage​
{
"$$uuid": /* input */,
"format": "CANONICAL" /* or NO_HYPHENS / BASE62 / BASE64 / BASE36 / V3 / V5 */,
"namespace": /* string */
}
"$$uuid([format],[namespace]):{input}"
note
Concrete values in the usage example are default values.
Returns​
string
Arguments​
Argument | Type | Values | Required / Default Value | Description |
---|---|---|---|---|
Primary | string | null | UUID | |
format | enum | CANONICAL / NO_HYPHENS /BASE62 /BASE64 /BASE36 /V3 / V5 | CANONICAL | Formatting (or generation in case of v3/v5) |
namespace | string | null | UUID to be used as salt (for V3/V5) |
NO_HYPHENS
(can also be specified asN
) - Same asCANONICAL
with hyphens removedBASE36
(can also be specified asB36
) - alphanumeric alphabetBASE62
(can also be specified asB62
) - alphanumeric alphabet, case sensitiveBASE64
(can also be specified asB64
) - "URL and Filename safe Base64 Alphabet"V3
- Consider input as name and generate a UUIDv3 (name-based, RFC 4122) (namespace optionally used)V5
- Consider input as name and generate a UUIDv5 (name-based, RFC 4122) (namespace optionally used)
Examples​
Input
Definition
Output
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid:$"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid(b36):$"
"9zye6dau0hvwo54msqyyjyzt1"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid(base36):$"
"9zye6dau0hvwo54msqyyjyzt1"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid(b62):$"
"58gxXh69c8X7f2Id3D84W5"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid(Base62):$"
"58gxXh69c8X7f2Id3D84W5"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid(b64):$"
"qOQdxnTJQsW7Azv9YjBExQ"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid(base64):$"
"qOQdxnTJQsW7Azv9YjBExQ"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid('base64'):$"
"qOQdxnTJQsW7Azv9YjBExQ"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid(N):$"
"a8e41dc674c942c5bb033bfd623044c5"
"a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"$$uuid(no_hyphens):$"
"a8e41dc674c942c5bb033bfd623044c5"
null
"$$uuid(n):a8e41dc6-74c9-42c5-bb03-3bfd623044c5"
"a8e41dc674c942c5bb033bfd623044c5"
"widget/1234567890"
"$$uuid(v3,4bdbe8ec-5cb5-11ea-bc55-0242ac130003):$"
"53564aa3-4154-3ca5-ac90-dba59dc7d3cb"
"widget/1234567890"
"$$uuid(v3):$"
"d904c507-ee93-3794-9a56-22b6f37cbfe6"
"widget/1234567890"
"$$uuid(v5,4bdbe8ec-5cb5-11ea-bc55-0242ac130003):$"
"a35477ae-bfb1-5f2e-b5a4-4711594d855f"