Reputation: 227
I have used Java's built-in APIs for data structures and Google Guava's additions to the API but JavaScript's support for data structures seems to be rather weak. If I need to use advanced data structures for JS, is there any library that I can include in my project?
Upvotes: 0
Views: 49
Reputation: 4724
The library collectionsjs contains a list implementation, which is "backed by a doubly linked list with a head node".
var list = new List([1, 2, 3]);
list.splice(1, 1, 6, 5);
alert(list.toArray());
// [1,6,5,3]
<script src="https://rawgit.com/montagejs/collections/master/collections.min.js" type="text/javascript"></script>
Upvotes: 1