TupleMap
A Map of limited size that keeps most recently used values. This lib is one of the several possible cache for memoize-immutable, but it can suit other use-cases as it implements a usual Map API.
Install
npm install --save LRUMap
This lib has no dependency, but requires a native implementation of Map.
Usage
var LRUMap = ; // The default size limit of the map is 10.000var cache = limit: 10000 ; var key = 'Carole';var value = any: 'thing'; cache; cache === true;cache === value;
When should you use this map?
This map should be used as an alternative to a native Map, when you need to limit its size.
Author
License
MPL-2.0