@dereekb/util 13.8.0 → 13.9.0
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/fetch/package.json +2 -2
- package/index.cjs.js +7 -0
- package/index.esm.js +7 -0
- package/package.json +1 -1
- package/src/lib/getter/getter.cache.d.ts +4 -0
- package/test/package.json +2 -2
package/fetch/package.json
CHANGED
package/index.cjs.js
CHANGED
|
@@ -6656,6 +6656,9 @@ function cachedGetter(factory) {
|
|
|
6656
6656
|
return loaded = undefined;
|
|
6657
6657
|
};
|
|
6658
6658
|
result.init = init;
|
|
6659
|
+
result.used = function() {
|
|
6660
|
+
return Boolean(loaded);
|
|
6661
|
+
};
|
|
6659
6662
|
return result;
|
|
6660
6663
|
}
|
|
6661
6664
|
|
|
@@ -16929,6 +16932,10 @@ function _unsupported_iterable_to_array$7(o, minLen) {
|
|
|
16929
16932
|
// check self
|
|
16930
16933
|
if (a === b) {
|
|
16931
16934
|
result = true;
|
|
16935
|
+
} else if (isDate(a) || isDate(b)) {
|
|
16936
|
+
// Check Date before applying the pojoFilter — the spread copy in
|
|
16937
|
+
// filterFromPOJOFunction destroys Date instances (producing {}).
|
|
16938
|
+
result = isDate(a) && isDate(b) && isEqualDate(a, b);
|
|
16932
16939
|
} else {
|
|
16933
16940
|
// run pojo filter before comparison
|
|
16934
16941
|
a = pojoFilter(a, true);
|
package/index.esm.js
CHANGED
|
@@ -6654,6 +6654,9 @@ function cachedGetter(factory) {
|
|
|
6654
6654
|
return loaded = undefined;
|
|
6655
6655
|
};
|
|
6656
6656
|
result.init = init;
|
|
6657
|
+
result.used = function() {
|
|
6658
|
+
return Boolean(loaded);
|
|
6659
|
+
};
|
|
6657
6660
|
return result;
|
|
6658
6661
|
}
|
|
6659
6662
|
|
|
@@ -16927,6 +16930,10 @@ function _unsupported_iterable_to_array$7(o, minLen) {
|
|
|
16927
16930
|
// check self
|
|
16928
16931
|
if (a === b) {
|
|
16929
16932
|
result = true;
|
|
16933
|
+
} else if (isDate(a) || isDate(b)) {
|
|
16934
|
+
// Check Date before applying the pojoFilter — the spread copy in
|
|
16935
|
+
// filterFromPOJOFunction destroys Date instances (producing {}).
|
|
16936
|
+
result = isDate(a) && isDate(b) && isEqualDate(a, b);
|
|
16930
16937
|
} else {
|
|
16931
16938
|
// run pojo filter before comparison
|
|
16932
16939
|
a = pojoFilter(a, true);
|
package/package.json
CHANGED
|
@@ -17,6 +17,10 @@ export type CachedGetter<T> = Getter<T> & {
|
|
|
17
17
|
* Re-initializes the getter and reloads the value from the source.
|
|
18
18
|
*/
|
|
19
19
|
init(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Returns true if the cache has been used since being reset.
|
|
22
|
+
*/
|
|
23
|
+
used(): boolean;
|
|
20
24
|
};
|
|
21
25
|
/**
|
|
22
26
|
* A cached factory that stores the result of the first call and returns it on subsequent calls.
|