cacheable 1.8.6 → 1.8.7
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 +3 -3
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
Cacheable: () => Cacheable,
|
|
34
34
|
CacheableEvents: () => CacheableEvents,
|
|
35
35
|
CacheableHooks: () => CacheableHooks,
|
|
@@ -44,7 +44,7 @@ __export(src_exports, {
|
|
|
44
44
|
wrap: () => wrap,
|
|
45
45
|
wrapSync: () => wrapSync
|
|
46
46
|
});
|
|
47
|
-
module.exports = __toCommonJS(
|
|
47
|
+
module.exports = __toCommonJS(index_exports);
|
|
48
48
|
var import_keyv2 = require("keyv");
|
|
49
49
|
var import_hookified2 = require("hookified");
|
|
50
50
|
|
package/dist/index.d.cts
CHANGED
|
@@ -371,7 +371,7 @@ declare class CacheableMemory extends Hookified {
|
|
|
371
371
|
* @param {Object} [options] - The options to wrap
|
|
372
372
|
* @returns {Function} - The wrapped function
|
|
373
373
|
*/
|
|
374
|
-
wrap<T>(function_: (...arguments_:
|
|
374
|
+
wrap<T, Arguments extends any[]>(function_: (...arguments_: Arguments) => T, options?: WrapFunctionOptions): (...arguments_: Arguments) => T;
|
|
375
375
|
private isPrimitive;
|
|
376
376
|
private concatStores;
|
|
377
377
|
private setTtl;
|
|
@@ -633,7 +633,7 @@ declare class Cacheable extends Hookified {
|
|
|
633
633
|
* @param {WrapOptions} [options] The options for the wrap function
|
|
634
634
|
* @returns {Function} The wrapped function
|
|
635
635
|
*/
|
|
636
|
-
wrap<T>(function_: (...arguments_:
|
|
636
|
+
wrap<T, Arguments extends any[]>(function_: (...arguments_: Arguments) => T, options?: WrapFunctionOptions): (...arguments_: Arguments) => T;
|
|
637
637
|
/**
|
|
638
638
|
* Will hash an object using the specified algorithm. The default algorithm is 'sha256'.
|
|
639
639
|
* @param {any} object the object to hash
|
package/dist/index.d.ts
CHANGED
|
@@ -371,7 +371,7 @@ declare class CacheableMemory extends Hookified {
|
|
|
371
371
|
* @param {Object} [options] - The options to wrap
|
|
372
372
|
* @returns {Function} - The wrapped function
|
|
373
373
|
*/
|
|
374
|
-
wrap<T>(function_: (...arguments_:
|
|
374
|
+
wrap<T, Arguments extends any[]>(function_: (...arguments_: Arguments) => T, options?: WrapFunctionOptions): (...arguments_: Arguments) => T;
|
|
375
375
|
private isPrimitive;
|
|
376
376
|
private concatStores;
|
|
377
377
|
private setTtl;
|
|
@@ -633,7 +633,7 @@ declare class Cacheable extends Hookified {
|
|
|
633
633
|
* @param {WrapOptions} [options] The options for the wrap function
|
|
634
634
|
* @returns {Function} The wrapped function
|
|
635
635
|
*/
|
|
636
|
-
wrap<T>(function_: (...arguments_:
|
|
636
|
+
wrap<T, Arguments extends any[]>(function_: (...arguments_: Arguments) => T, options?: WrapFunctionOptions): (...arguments_: Arguments) => T;
|
|
637
637
|
/**
|
|
638
638
|
* Will hash an object using the specified algorithm. The default algorithm is 'sha256'.
|
|
639
639
|
* @param {any} object the object to hash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cacheable",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.7",
|
|
4
4
|
"description": "High Performance Layer 1 / Layer 2 Caching with Keyv Storage",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"private": false,
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@keyv/redis": "^4.0
|
|
24
|
+
"@keyv/redis": "^4.2.0",
|
|
25
25
|
"@types/node": "^22.10.2",
|
|
26
26
|
"@vitest/coverage-v8": "^2.1.8",
|
|
27
27
|
"lru-cache": "^11.0.2",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"xo": "^0.60.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"hookified": "^1.
|
|
36
|
-
"keyv": "^5.2.
|
|
35
|
+
"hookified": "^1.6.0",
|
|
36
|
+
"keyv": "^5.2.3"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
39
39
|
"cacheable",
|