1.0.0 • Published 2 years ago

es6-timed-map v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
2 years ago

npm version License: MIT TypeScript

Open in Gitpod

es6-timed-map

An es6-map-like utility class with time based functions and support

Summary

This class provides a similar interface as the es6 Map, however this also provides "timed" based functionality to automatically remove older entries.

Installation

This library is available on npm:

npm install es6-timed-map

Usage

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'

Contributing

See CONTRIBUTING and review the CODE_OF_CONDUCT.

Reference

See the typedocs based doc site: https://bradtaniguchi.dev/es6-timed-map

Security

See SECURITY

Hacktoberfest 2020 :jack_o_lantern:

This repo participated in hacktoberfest 2020, so thank you for all of those that participated, keep learning, keep building and happy hacktoberfest! :+1:

License

MIT

1.0.0

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.1.0

3 years ago

0.1.2

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.3

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

0.0.0

3 years ago