Implementations of common data structures in javascript