@keyvhq/memoize 2.1.7 → 2.1.9

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.
Files changed (2) hide show
  1. package/package.json +4 -3
  2. package/src/index.js +2 -1
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@keyvhq/memoize",
3
3
  "description": "Memoize any function using Keyv as storage backend.",
4
4
  "homepage": "https://keyv.js.org",
5
- "version": "2.1.7",
5
+ "version": "2.1.9",
6
6
  "types": "./src/index.d.ts",
7
7
  "main": "src/index.js",
8
8
  "author": {
@@ -30,7 +30,8 @@
30
30
  ],
31
31
  "dependencies": {
32
32
  "@keyvhq/core": "2.1.7",
33
- "mimic-fn": "~3.0.0"
33
+ "mimic-fn": "~3.0.0",
34
+ "null-prototype-object": "~1.0.0"
34
35
  },
35
36
  "devDependencies": {
36
37
  "ava": "5"
@@ -48,5 +49,5 @@
48
49
  "publishConfig": {
49
50
  "access": "public"
50
51
  },
51
- "gitHead": "81ccbbaabfa49c4741ec587e7bbaddb2ce68024e"
52
+ "gitHead": "9246bdb25a3b69bc79c525042a58336a8325a9c5"
52
53
  }
package/src/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  'use strict'
2
2
 
3
+ const NullProtoObj = require('null-prototype-object')
3
4
  const Keyv = require('@keyvhq/core')
4
5
  const mimicFn = require('mimic-fn')
5
6
 
@@ -28,7 +29,7 @@ function memoize (
28
29
  ? () => rawStaleTtl
29
30
  : rawStaleTtl
30
31
 
31
- const pending = Object.create(null)
32
+ const pending = new NullProtoObj()
32
33
 
33
34
  /**
34
35
  * This can be better. Check: