@supernova-studio/client 0.53.4 → 0.53.5

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.js CHANGED
@@ -46,7 +46,6 @@ var _zod = require('zod');
46
46
 
47
47
 
48
48
 
49
- var _deepequal = require('deep-equal'); var _deepequal2 = _interopRequireDefault(_deepequal);
50
49
 
51
50
 
52
51
  var _slugify = require('@sindresorhus/slugify'); var _slugify2 = _interopRequireDefault(_slugify);
@@ -791,6 +790,27 @@ function groupBy(items, keyFn) {
791
790
  }
792
791
  return result;
793
792
  }
793
+ function areShallowObjectsEqual(lhs, rhs) {
794
+ if (lhs === void 0 !== (rhs === void 0))
795
+ return false;
796
+ if (lhs === void 0 || rhs === void 0)
797
+ return true;
798
+ if (lhs === null !== (rhs === null))
799
+ return false;
800
+ if (lhs === null || rhs === null)
801
+ return true;
802
+ for (const key in lhs) {
803
+ if (!(key in rhs) || lhs[key] !== rhs[key]) {
804
+ return false;
805
+ }
806
+ }
807
+ for (const key in rhs) {
808
+ if (!(key in lhs)) {
809
+ return false;
810
+ }
811
+ }
812
+ return true;
813
+ }
794
814
  var ContentLoadInstruction = _zod.z.object({
795
815
  from: _zod.z.string(),
796
816
  to: _zod.z.string(),
@@ -1868,7 +1888,7 @@ function areAttributesEqual(lhs, rhs) {
1868
1888
  const lhsMap = mapByUnique(lhs, (i) => i.type);
1869
1889
  for (const rhsAttribute of rhs) {
1870
1890
  const lhsAttribute = lhsMap.get(rhsAttribute.type);
1871
- if (!_deepequal2.default.call(void 0, lhsAttribute, rhsAttribute))
1891
+ if (!areShallowObjectsEqual(lhsAttribute, rhsAttribute))
1872
1892
  return false;
1873
1893
  }
1874
1894
  return true;