A type of Map that has the additional guarantee that the iteration order of entries will be the order in which they were set().
The iteration behavior of OrderedMap is the same as native ES6 Map and JavaScript Object.
Note that OrderedMap are more expensive than non-ordered Map and may consume more memory. OrderedMap#set is amortized O(log32 N), but not stable.
OrderedMap
Map
OrderedMap#set
A type of Map that has the additional guarantee that the iteration order of entries will be the order in which they were set().
The iteration behavior of OrderedMap is the same as native ES6 Map and JavaScript Object.
Note that
OrderedMapare more expensive than non-orderedMapand may consume more memory.OrderedMap#setis amortized O(log32 N), but not stable.