dsjslib
This is a collection of different data structures and utilities, implemented in JavaScript. Its written and tested using Node.js which is also the target platform.
API Documentation >>
Overview
-
New
-
Maps
-
Sorted Maps
Two different backing stores are available * AVLTree * Skip List
-
Tries
-
Multi-Valued
- MultiMap
- TreeMultiMap - In addition, Map is sorted on keys. Uses AVLTree as backing store
-
-
Queues
-
Linked Deque
-
Priority Queue
-
Delay Queue
For example usage see wiki: DelayQueue-for-Scheduled-Task-Management
-
-
Utilities
inspired by Google Guava Loading Cache . The cache is simpler since it doesn't have to deal with concurrent threads, but other functionality of Guava cache are captured like - Auto loader function - Removal listener - Auto expiry After Write (TTL) - Max Size and weight - Cache Stats recording For usage and overview see wiki: https://github.com/monmohan/dsjslib/wiki/LRU-Cache-Feature-and-usage-overview
When the buffer is filled, new data is written starting at the beginning of the buffer and overwriting the old.
Installation
npm install dsjslib
Current version 0.6.9 is stable and thoroughly tested on Node v0.10