4 ms·
In this example, why use YAML at all?... const thingies = ["a", "b"]; const config = [ "foo", "bar", "baz", { thingies:
by shhsshs 4y ago
In this example, why use YAML at all?...
const thingies = ["a", "b"];
const config = [
"foo",
"bar",
"baz",
{
thingies: thingies.map(thing => ({ thing })),
},
]
// config = ["foo", "bar", "baz", { "thingies": [{"thing": "a"}, {"thing": "b"}] }]
- zeroonetwothree 4y agoRight, it's not a great example since yaml is intentionally equivalent to JS objects.