@keyv/bigmap 1.0.2 → 1.0.3
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/dist/index.cjs +4 -5
- package/dist/index.js +4 -5
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -136,10 +136,7 @@ var BigMap = class extends import_hookified.Hookified {
|
|
|
136
136
|
return this.getStoreMap(0);
|
|
137
137
|
}
|
|
138
138
|
const storeSize = this._storeSize - 1;
|
|
139
|
-
const index = this._storeHashFunction ? this._storeHashFunction(String(key), storeSize) : (
|
|
140
|
-
/* c8 ignore next */
|
|
141
|
-
defaultHashFunction(String(key), storeSize)
|
|
142
|
-
);
|
|
139
|
+
const index = this._storeHashFunction ? this._storeHashFunction(String(key), storeSize) : defaultHashFunction(String(key), storeSize);
|
|
143
140
|
return this.getStoreMap(index);
|
|
144
141
|
}
|
|
145
142
|
/**
|
|
@@ -212,7 +209,9 @@ var BigMap = class extends import_hookified.Hookified {
|
|
|
212
209
|
*/
|
|
213
210
|
forEach(callbackfn, thisArg) {
|
|
214
211
|
this._store.forEach((store) => {
|
|
215
|
-
store.forEach(
|
|
212
|
+
store.forEach((value, key) => {
|
|
213
|
+
callbackfn.call(thisArg, value, key, this);
|
|
214
|
+
});
|
|
216
215
|
});
|
|
217
216
|
}
|
|
218
217
|
/**
|
package/dist/index.js
CHANGED
|
@@ -110,10 +110,7 @@ var BigMap = class extends Hookified {
|
|
|
110
110
|
return this.getStoreMap(0);
|
|
111
111
|
}
|
|
112
112
|
const storeSize = this._storeSize - 1;
|
|
113
|
-
const index = this._storeHashFunction ? this._storeHashFunction(String(key), storeSize) : (
|
|
114
|
-
/* c8 ignore next */
|
|
115
|
-
defaultHashFunction(String(key), storeSize)
|
|
116
|
-
);
|
|
113
|
+
const index = this._storeHashFunction ? this._storeHashFunction(String(key), storeSize) : defaultHashFunction(String(key), storeSize);
|
|
117
114
|
return this.getStoreMap(index);
|
|
118
115
|
}
|
|
119
116
|
/**
|
|
@@ -186,7 +183,9 @@ var BigMap = class extends Hookified {
|
|
|
186
183
|
*/
|
|
187
184
|
forEach(callbackfn, thisArg) {
|
|
188
185
|
this._store.forEach((store) => {
|
|
189
|
-
store.forEach(
|
|
186
|
+
store.forEach((value, key) => {
|
|
187
|
+
callbackfn.call(thisArg, value, key, this);
|
|
188
|
+
});
|
|
190
189
|
});
|
|
191
190
|
}
|
|
192
191
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@keyv/bigmap",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Bigmap for Keyv",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"hookified": "^1.12.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@biomejs/biome": "^2.2.
|
|
38
|
+
"@biomejs/biome": "^2.2.5",
|
|
39
39
|
"@faker-js/faker": "^10.0.0",
|
|
40
40
|
"@vitest/coverage-v8": "^3.2.4",
|
|
41
41
|
"rimraf": "^6.0.1",
|