Comparing version 1.0.3 to 1.0.4
{ | ||
"index.js": { | ||
"bundled": 2634, | ||
"minified": 1195, | ||
"gzipped": 529, | ||
"bundled": 2655, | ||
"minified": 1209, | ||
"gzipped": 534, | ||
"treeshaked": { | ||
@@ -12,3 +12,3 @@ "rollup": { | ||
"webpack": { | ||
"code": 1757 | ||
"code": 1771 | ||
} | ||
@@ -18,6 +18,6 @@ } | ||
"index.cjs.js": { | ||
"bundled": 6144, | ||
"minified": 3425, | ||
"gzipped": 1284 | ||
"bundled": 6165, | ||
"minified": 3439, | ||
"gzipped": 1289 | ||
} | ||
} |
@@ -71,3 +71,3 @@ 'use strict'; | ||
if (args === undefined) cache.splice(0, cache.length);else { | ||
if (args === undefined || args.length === 0) cache.splice(0, cache.length);else { | ||
var entry = cache.find(function (entry) { | ||
@@ -74,0 +74,0 @@ return deepEqual__default['default'](args, entry.args); |
@@ -40,3 +40,3 @@ import deepEqual from 'fast-deep-equal'; | ||
function clear(cache, ...args) { | ||
if (args === undefined) cache.splice(0, cache.length);else { | ||
if (args === undefined || args.length === 0) cache.splice(0, cache.length);else { | ||
const entry = cache.find(entry => deepEqual(args, entry.args)); | ||
@@ -43,0 +43,0 @@ |
{ | ||
"name": "use-asset", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "A data fetching strategy for React Suspense", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
@@ -59,3 +59,3 @@ import deepEqual from 'fast-deep-equal' | ||
function clear<Response, Args extends any[]>(cache: PromiseCache<Response, Args>[], ...args: Args) { | ||
if (args === undefined) cache.splice(0, cache.length) | ||
if (args === undefined || args.length === 0) cache.splice(0, cache.length) | ||
else { | ||
@@ -62,0 +62,0 @@ const entry = cache.find((entry) => deepEqual(args, entry.args)) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
183849