Hacker News new | ask | show | jobs
by shhsshs 1194 days 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"}] }]
1 comments

Right, it's not a great example since yaml is intentionally equivalent to JS objects.