From a808d7718db44264a1f14fc8b87a3ac80f64ddd9 Mon Sep 17 00:00:00 2001 From: Michael Di Prisco Date: Thu, 26 Sep 2024 11:29:34 +0200 Subject: [PATCH] chore: linting --- src/index.test.ts | 2 +- src/lib.ts | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.test.ts b/src/index.test.ts index e95f3e9..a93fe3f 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -230,7 +230,7 @@ describe('Higher-Order Function', () => { return 'custom-key'; }, events: { - onCacheSet: ({key}) => { + onCacheSet: ({ key }) => { expect(key).toBe('custom-key'); } } diff --git a/src/lib.ts b/src/lib.ts index bf6e030..55087d8 100644 --- a/src/lib.ts +++ b/src/lib.ts @@ -111,7 +111,9 @@ export function cacheCandidate Promise>( return function cacheCandidateWrapper(...args: Parameters): ReturnType { return letsCandidate({ options, - key: _options.customKeyFunction ? _options.customKeyFunction(args) : getDataCacheKey([uniqueIdentifier, JSON.stringify(args)]), + key: _options.customKeyFunction + ? _options.customKeyFunction(args) + : getDataCacheKey([uniqueIdentifier, JSON.stringify(args)]), timeoutCache, runningQueryCache, timeframeCache,