<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

### Table of Contents

-   [MaxAgeCache][1]
    -   [Parameters][2]
    -   [maxAge][3]
        -   [Parameters][4]
    -   [set][5]
        -   [Parameters][6]
    -   [get][7]
        -   [Parameters][8]
    -   [has][9]
        -   [Parameters][10]
    -   [del][11]
        -   [Parameters][12]
    -   [keys][13]
        -   [Parameters][14]
    -   [values][15]
        -   [Parameters][16]
    -   [entries][17]
        -   [Parameters][18]
    -   [toObject][19]
        -   [Parameters][20]
-   [isUndefined][21]
    -   [Parameters][22]
-   [oSetNonEnum][23]
    -   [Parameters][24]
-   [repeatEvery][25]
    -   [Parameters][26]

## MaxAgeCache

### Parameters

-   `maxAgeMs` **[number][27]** The number of milliseconds that is the maximum age of entries.

Returns **[MaxAgeCache][28]** A new MaxAgeCache instance.

### maxAge

Sets the maximum age for new entries.

#### Parameters

-   `ms` **[number][27]** The number of milliseconds to be the maximum age of entries.

Returns **void** void

### set

Add a keyval to the cache. Chainable.

#### Parameters

-   `key` **[string][29]** The key
-   `value` **any** The value

Returns **[MaxAgeCache][28]** this self

### get

Add a keyval to the cache. Chainable.

#### Parameters

-   `key` **[string][29]** The key
-   `resetAge`   (optional, default `true`)

Returns **(null | any)** The retrieved value

### has

Check whether a key exists.

#### Parameters

-   `key` **[string][29]** The key

Returns **[boolean][30]** boolean

### del

Delete a key and its corresponding value.

#### Parameters

-   `key` **[string][29]** The key

Returns **void** void

### keys

Returns all keys as an array.

#### Parameters

-   `key` **[string][29]** The key

Returns **[Array][31]&lt;[string][29]>** An array of string keys.

### values

Returns all values as an array.

#### Parameters

-   `key` **[string][29]** The key

Returns **[Array][31]&lt;any>** An array of values.

### entries

Returns all entries as an array.

#### Parameters

-   `key` **[string][29]** The key

Returns **[Array][31]&lt;[Array][31]&lt;[string][29], any>>** An array of entries.

### toObject

Returns all data as an object of the cache's keys and values.

#### Parameters

-   `key` **[string][29]** The key

Returns **[object][32]** object

## isUndefined

Returns true if value 'v' is undefined.

### Parameters

-   `value` **any** The value to evaluate

Returns **[boolean][30]** boolean

## oSetNonEnum

Adds a non-enumerable property on object, 'o'

### Parameters

-   `o` **[object][32]** The object on which to set a property value
-   `key` **[string][29]** The property key name
-   `value` **[string][29]** The property value

Returns **void** 

## repeatEvery

Continuously calls the callback function with a millisecond-specified delay, 'ms'

### Parameters

-   `ms` **[number][27]** The millisecond delay
-   `callback` **[function][33]** The callback function that will be called every 'ms' milliseconds.

Returns **[function][33]** a cancellation function

[1]: #maxagecache

[2]: #parameters

[3]: #maxage

[4]: #parameters-1

[5]: #set

[6]: #parameters-2

[7]: #get

[8]: #parameters-3

[9]: #has

[10]: #parameters-4

[11]: #del

[12]: #parameters-5

[13]: #keys

[14]: #parameters-6

[15]: #values

[16]: #parameters-7

[17]: #entries

[18]: #parameters-8

[19]: #toobject

[20]: #parameters-9

[21]: #isundefined

[22]: #parameters-10

[23]: #osetnonenum

[24]: #parameters-11

[25]: #repeatevery

[26]: #parameters-12

[27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number

[28]: #maxagecache

[29]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

[30]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean

[31]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[32]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[33]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function
