OrderedDict
A simple, extendable, sortable JavaScript OrderedDict.
Installation
npm i js-ordered-dict
Example Usage
var a = ; //set/pusha;a;a; //geta; //['Citabria','777','Cub'] (note: respects order of entry)a; //['Bellanca','Boeing','Piper'] (note: respects order of entry)a; //'Cub'a; //truea; //'Citabria'a; //'Cub'a; //'777'a; //'Bellanca'a; //'Piper'a; //'Boeing' //lengthasize; //3 //removala;a; //['Citabria','Cub'] //iterationa; //updating valuesa;a; //['Decathalon','Cub'] //inserting values at a certain positionasize; //2a;a; //['Decathalon', {'model': 'HondaJet'}, 'Cub']asize; //3 //clearaclear;a; //[] //sortingaarr; //using built-in Array.prototype.sort()a; //['172','Yankee','SR-72'] //clonelet d = ;d; let a = d;a; //'bar'
License
MIT. Free to use in all your things!
Contribution
DO IT! PR's welcome. Need to add testing and linting.