coffeescript-repl
coffeescript-repl copied to clipboard
Nesting of arrays not displayed
All of the [ and ] are dropped in the display:
coffee> [1,2,3]
1,2,3
coffee> [[1,2,3]]
1,2,3
coffee> [[1,2,3],[4,5,6]]
1,2,3,4,5,6
coffee> [1,[2,[3,4,5,6]]]
1,2,3,4,5,6
That's because Array.prototype.toString is being used naively. Some equivalent to node's util.inspect needs to be used.
I just pushed a complete rewrite with one of the changes being to use node's util.inspect for output, as Michael suggested (thanks!). Arrays should be printing all pretty-like now.