abstract data structures for js with unified api