Before I go and create this myself, I thought I'd see if anyone knows a library that does this.
I'm looking for a function that will take something in Javascript, be it an array, an associative array, a number, or even a string, and convert it to something that looks like it. For example:
toString([1,2,3]) === '[1, 2, 3]'
toString([[1,2], [2,4], [3,6]]) === '[[1,2], [2,4], [3,6]]'
toString(23) === '23'
toString('hello world') === 'hello world'
toString({'one': 1, 'two': 2, 'three': 3}) === "{'one': 1, 'two': 2, 'three': 3}"