@isaacs/ttlcache 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +1 -1
- package/index.js +2 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
// Relies on the fact that integer Object keys are kept sorted,
|
|
4
4
|
// and managed very efficiently by V8.
|
|
5
5
|
|
|
6
|
+
/* istanbul ignore next */
|
|
6
7
|
const perf =
|
|
7
8
|
typeof performance === 'object' &&
|
|
8
9
|
performance &&
|
|
9
10
|
typeof performance.now === 'function'
|
|
10
11
|
? performance
|
|
11
12
|
: Date
|
|
13
|
+
|
|
12
14
|
const now = () => perf.now()
|
|
13
15
|
const isPosInt = n => n && n === Math.floor(n) && n > 0 && isFinite(n)
|
|
14
16
|
const isPosIntOrInf = n => n === Infinity || isPosInt(n)
|