Eter
Éter is a conglomerate of lightweight collections for JavaScript running on node and browser.
Usage
For node, install the package and include it
var eter = ;
For the browser, just include the modules you want. You could use Bower to install the package
bower install eter --save
And include the script
Types
If you use TypeScript, typings are included
; ;
Collections
Stack
A Stack is a Last-In-First-Out (LIFO) data structure.
var s = ; s;s;s;//2s;//1s;//trues;//Error "Empty stack"
Queue
A Queue is a First-In-First-Out (FIFO) data structure.
var q = ; q;q;q;//1q;//2q;//trueq;//Error "Empty queue"
LinkedList
A Linked List is a data structure consisting of a group of nodes which together represent a sequence.
var l = ; l;l;//1l;l;//truel;//Error "Index 0 out of bounds"
Trie
A Trie is an ordered tree data structure that is used to store a dynamic set or associative array where the keys are usually strings.
var t = ; t;t;t;t;//truet;t;t;//false
Hash Map
A Hash Map is a data structure used to implement an associative array, a structure that can map keys to values.
var m = ; m;m;//valuem;//truem;m;//false
Binary Tree
A Binary Tree is a data structure used for logarithmic search access.
var t = ; t;t;//valuet;t;//null