Got tired of writing maps, so I wrote a macro to make maps from variables for me

As someone who has never done any JS at all (and hopefully never will), I find myself often needing to create these types of maps, for example when doing structured logging, or when providing error responses from an API. Many times I’ve thought of writing that same macro that Magnus wrote, but somehow I never got around to it :smiley:

1 Like