I think the most useful feature here is JSON -> JS conversion. Relatively often I find myself copying and pasting some JSON into a JS file then manually deleting / regexing away the unnecessary quote marks around key names.
var foo = "bar";
var baz = {
foo: "qux"
}; {
bar: "qux"
}
?Don't you use syntax highlighting? I can't imagine this ever being an issue...
foo = {
"bar": true,
"baz": false
}
to: foo.bar = true;
foo.baz = false;
then I have extra quotes to delete. Those half seconds add up over a year!I guess you could argue the opposite though, that this looks messy:
let headers = {
Expires: 0,
'Content-Type': 'application/json'
}
Which leads me to believe it's a matter of personal preference, and you should just pick one and stick to it :) And look, there's even an eslint rule for it: http://eslint.org/docs/rules/quote-props