| 1 |
end { |
| 2 |
outputs = {}; |
| 3 |
|
| 4 |
outputs["mode_0"] = mode(0); |
| 5 |
outputs["mode_null"] = mode(null); |
| 6 |
outputs["mode_nonesuch"] = mode(nonesuch); |
| 7 |
|
| 8 |
outputs["mode_empty_array"] = mode([]); |
| 9 |
outputs["mode_array_1"] = mode([7]); |
| 10 |
outputs["mode_array_3a"] = mode([7,8,9]); |
| 11 |
outputs["mode_array_3b"] = mode([7,8,7]); |
| 12 |
outputs["mode_array_nested"] = mode([7,[8,8,8,8,8,8],9,9,9]); |
| 13 |
|
| 14 |
outputs["mode_empty_map"] = mode({}); |
| 15 |
outputs["mode_map_1"] = mode({ "a" : 7} ); |
| 16 |
outputs["mode_map_3a"] = mode({ "a" : 7, "b" : 8, "c" : 9 } ); |
| 17 |
outputs["mode_map_3b"] = mode({ "a" : 7, "b" : 8, "c" : 7 } ); |
| 18 |
outputs["mode_map_nested"] = mode({ "a" : 7, "b" : [8,8,8,8,8,8], "c" : 9, "d": 9, "e": 9 }); |
| 19 |
|
| 20 |
typed_outputs = {}; |
| 21 |
|
| 22 |
for (k, v in outputs) { |
| 23 |
typed_outputs[k] = v; |
| 24 |
typed_outputs[k."_type"] = typeof(v); |
| 25 |
} |
| 26 |
|
| 27 |
emit typed_outputs; |
| 28 |
} |