News for hackers. Stuff that matters.
Re:Show HN: JsonTree, a 3.53kb JavaScript tool for generatin... by brockwhittaker on Friday February 24, 2017 @07:28PM (#13729233)
You should consider removing all the other functions from the global scope, especially because they have relatively generic names like "generateTree", "toArray", "depth", and "toggleClass".

Consider using an actual class or a closure perhaps?

Re:Show HN: JsonTree, a 3.53kb JavaScript tool for generatin... by MaxLeiter on Tuesday February 28, 2017 @03:07PM (#13757361)
Wrapped in a closure, thanks!