map-age-cleaner
- Version 0.2.0
- Published
- 7.79 kB
- 1 dependency
- MIT license
Install
npm i map-age-cleaner
yarn add map-age-cleaner
pnpm add map-age-cleaner
Overview
Automatically cleanup expired items in a Map
Index
Functions
Functions
function mapAgeCleaner
mapAgeCleaner: { <K = any, V extends MaxAgeEntry = MaxAgeEntry>(map: Map<K, V>): any; <K = any, V = Entry>(map: Map<K, V>, property: string): any;};
Automatically cleanup the items in the provided
map
. The property of the expiration timestamp should be namedmaxAge
.Parameter map
Map instance which should be cleaned up.
Automatically cleanup the items in the provided
map
.Parameter map
Map instance which should be cleaned up.
Parameter property
Name of the property which olds the expiry timestamp.
Package Files (1)
Dependencies (1)
Dev Dependencies (10)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/map-age-cleaner
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/map-age-cleaner)
- HTML<a href="https://www.jsdocs.io/package/map-age-cleaner"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 905 ms. - Missing or incorrect documentation? Open an issue for this package.