-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexamples-uuid.js
More file actions
62 lines (50 loc) · 2.12 KB
/
examples-uuid.js
File metadata and controls
62 lines (50 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// MicroCODE: define this module's name for logging
const MODULE_NAME = 'examples-uudi.js';
const data = require('./index.js');
let uuid;
{
// debug: NIL Value
uuid = "00000000-0000-0000-0000-000000000000";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "NIL"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv1 - Unicast
uuid = "C232AB00-9414-11EC-B3C8-6F6BDECED846";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv1"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv1 - Multicast
uuid = "C232AB00-9414-11EC-A3C8-AF6BDECED846";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv1"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv2
uuid = "f47ac10b-58cc-21cf-a2d0-00a0c91e6bf6";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv2"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv3
uuid = "5df41881-3aed-3515-88a7-2f4a814cf09e";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv3"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv4
uuid = "919108f7-52d1-4320-9bac-f847db4148a8";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv4"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv5
uuid = "2ed6657d-e927-568b-95e1-2665a8aea6a2";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv5"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv6
uuid = "1EC9414C-232A-6B00-B3C8-9F6BDECED846";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv6"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv7
uuid = "017F22E2-79B0-7CC3-98C4-DC0C0C07398F";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv7"}, uuidJson);
// debug: Variant 2 (RFC 4122/9562) UUIDv8
uuid = "ffffffff-ffff-8fff-9fff-ffffffffffff";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "UUIDv8"}, uuidJson);
// debug: MAX Value
uuid = "ffffffff-ffff-ffff-ffff-ffffffffffff";
uuidJson = data.uuidDecode(uuid);
console.log({"Version": "MAX"}, uuidJson);
}