docs: general cleanup and improvements (#6299)

Co-authored-by: DaStormer <40336269+DaStormer@users.noreply.github.com>
Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com>
Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
Rodry
2021-08-05 20:34:06 +01:00
committed by GitHub
parent 4241febe24
commit b4afcf8236
39 changed files with 203 additions and 136 deletions

View File

@@ -100,11 +100,11 @@ class LimitedCollection extends Collection {
/**
* Options for generating a filter function based on lifetime
* @typedef {Object} LifetimeFilterOptions
* @property {number} [lifetime=14400] How long an entry should stay in the collection before it is considered
* sweepable.
* @property {Function} [getComparisonTimestamp=`e => e.createdTimestamp`] A function that takes an entry, key,
* @property {number} [lifetime=14400] How long, in seconds, an entry should stay in the collection
* before it is considered sweepable.
* @property {Function} [getComparisonTimestamp=e => e?.createdTimestamp] A function that takes an entry, key,
* and the collection and returns a timestamp to compare against in order to determine the lifetime of the entry.
* @property {Function} [excludeFromSweep=`() => false`] A function that takes an entry, key, and the collection
* @property {Function} [excludeFromSweep=() => false] A function that takes an entry, key, and the collection
* and returns a boolean, `true` when the entry should not be checked for sweepability.
*/