An es6-map-like utility class with time based functions and support
This class provides a similar interface as the es6 Map, however this also provides "timed" based functionality to automatically remove older entries.
This library is available on npm:
npm install es6-timed-map
Here is a basic example of using this library (more examples will be on the way)
const TimedMap = require('es6-timed-map');
const timedMap = new TimedMap();
timedMap.set('firstKey', 'first-value', 100); // save for 100ms
timedMap.set('secondKey', 'second-value', 300); // save for 300ms
// wait for 100ms
console.log(timedMap.get('firstKey')); // undefined
console.log(timedMap.get('secondKey')); // 'second-value'
See CONTRIBUTING and review the CODE_OF_CONDUCT.
See the typedocs based doc site: https://bradtaniguchi.dev/es6-timed-map
See SECURITY
This repo participated in hacktoberfest 2020, so thank you for all of those that participated, keep learning, keep building and happy hacktoberfest! :+1:
Generated using TypeDoc