Is there a JS function that will turn [/a/, []] into "[/a/, []]"? JSON.stringify mangles regexes and toString() mangles arrays. > JSON.stringify([/a/, []]) '[{},[]]' > [/a/, []].toString() '/a/,'
If you're using Node and are just using it for debug purposes then you can also use `require('util').inspect`.
-
-
Inspect's whitespace handling is a problem for esoteric reasons, but it's good to know about both of these options for the future; thanks!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
(Err, I mean that inspect's whitespace handling is a problem for this particular application, where things need to match up tightly to some other existing data for Reasons.)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
he/him 