@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.
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dereekb/util/fetch",
3
- "version": "13.8.0",
3
+ "version": "13.9.0",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.8.0",
5
+ "@dereekb/util": "13.9.0",
6
6
  "make-error": "^1.3.0",
7
7
  "fast-content-type-parse": "^3.0.0"
8
8
  },
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dereekb/util",
3
- "version": "13.8.0",
3
+ "version": "13.9.0",
4
4
  "exports": {
5
5
  "./test": {
6
6
  "module": "./test/index.esm.js",
@@ -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.
package/test/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@dereekb/util/test",
3
- "version": "13.8.0",
3
+ "version": "13.9.0",
4
4
  "peerDependencies": {
5
- "@dereekb/util": "13.8.0",
5
+ "@dereekb/util": "13.9.0",
6
6
  "make-error": "^1.3.0"
7
7
  },
8
8
  "exports": {