

Damncomma.js - because we all hate that damn comma... - exratione
https://github.com/exratione/damncomma

======
exratione
Because we all hate that damn comma... What is the Damn Comma?

[ "a", "b", // <\---- this is! ]

{ x: "x", y: "y", // <\---- so is this! }

If you came to Javascript from PHP or Python, you no doubt feel much as I do
about the damn comma. So here is a quick hack to make you feel that much
better about life.

How Does it Work?

By introducing a little trivial preprocessing into require() and JSON.parse()
to smooth away the damn commas. See /example for usage.

Why Would I Even Use This?

Because you enjoy losing an annoying language feature and gaining the nebulous
uncertainty that comes with introducing possibly deep and unexpected bugs.
After all, who doesn't enjoy preprocessing the source code before it goes
anywhere near a compiler or interpreter, such that it bears no semblance to
what was written? Why, some of the most successful languages in history are
practically built on that foundation - you'll be standing on the shoulders of
giants!

