Express hex-shaped data with the hex() builtin instead of a hand-rolled choice
This commit is contained in:
+1
-2
@@ -5,7 +5,6 @@
|
|||||||
"o": [{ "format": "0", "weight": 3 }, { "format": "10", "weight": 4 }, { "format": "#100", "weight": 2 }]
|
"o": [{ "format": "0", "weight": 3 }, { "format": "10", "weight": 4 }, { "format": "#100", "weight": 2 }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"format": "{g}:{g}:{g}:{g}:{g}:{g}:{g}:{g}",
|
"format": "{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}"
|
||||||
"g": [{ "format": "{x}{x}{x}{x}", "x": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"] }]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
+1
-4
@@ -1,6 +1,3 @@
|
|||||||
[
|
[
|
||||||
{
|
{ "format": "{hex(2)}:{hex(2)}:{hex(2)}:{hex(2)}:{hex(2)}:{hex(2)}" }
|
||||||
"format": "{x}{x}:{x}{x}:{x}{x}:{x}{x}:{x}{x}:{x}{x}",
|
|
||||||
"x": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
|
|||||||
+2
-3
@@ -1,7 +1,6 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"format": "{x}{x}{x}{x}{x}{x}{x}{x}-{x}{x}{x}{x}-4{x}{x}{x}-{y}{x}{x}{x}-{x}{x}{x}{x}{x}{x}{x}{x}{x}{x}{x}{x}",
|
"format": "{hex(8)}-{hex(4)}-4{hex(3)}-{variant}{hex(3)}-{hex(12)}",
|
||||||
"x": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"],
|
"variant": ["8", "9", "a", "b"]
|
||||||
"y": ["8", "9", "a", "b"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
+1
-2
@@ -5,7 +5,6 @@
|
|||||||
"o": [{ "format": "0", "weight": 3 }, { "format": "10", "weight": 4 }, { "format": "#100", "weight": 2 }]
|
"o": [{ "format": "0", "weight": 3 }, { "format": "10", "weight": 4 }, { "format": "#100", "weight": 2 }]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"format": "{g}:{g}:{g}:{g}:{g}:{g}:{g}:{g}",
|
"format": "{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}:{hex(4)}"
|
||||||
"g": [{ "format": "{x}{x}{x}{x}", "x": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"] }]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user