@rebasepro/common 0.1.0 → 0.1.2

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.umd.js CHANGED
@@ -1,6 +1,6 @@
1
1
  (function(global, factory) {
2
- typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@rebasepro/types"), require("@rebasepro/utils"), require("json-logic-js"), require("fast-equals"), require("lodash/cloneDeep.js")) : typeof define === "function" && define.amd ? define(["exports", "@rebasepro/types", "@rebasepro/utils", "json-logic-js", "fast-equals", "lodash/cloneDeep.js"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["Rebase Util"] = {}, global.types, global.utils, global.jsonLogic, global.fastEquals, global.cloneDeep));
3
- })(this, function(exports2, types, utils, jsonLogic, fastEquals, cloneDeep) {
2
+ typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("@rebasepro/types"), require("@rebasepro/utils"), require("json-logic-js"), require("fast-equals")) : typeof define === "function" && define.amd ? define(["exports", "@rebasepro/types", "@rebasepro/utils", "json-logic-js", "fast-equals"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global["Rebase Util"] = {}, global.types, global.utils, global.jsonLogic, global.fastEquals));
3
+ })(this, function(exports2, types, utils, jsonLogic, fastEquals) {
4
4
  "use strict";
5
5
  const DEFAULT_ONE_OF_TYPE = "type";
6
6
  const DEFAULT_ONE_OF_VALUE = "value";
@@ -1601,7 +1601,7 @@
1601
1601
  ...c
1602
1602
  }));
1603
1603
  normalizedCollections.forEach((c, index) => {
1604
- const raw = cloneDeep(collections[index]);
1604
+ const raw = utils.deepClone(collections[index]);
1605
1605
  this.rootCollections.push(c);
1606
1606
  this.rawRootCollections.push(raw);
1607
1607
  const normalized = this.normalizeCollection(c);
@@ -1621,7 +1621,7 @@
1621
1621
  if (!subCollection) return;
1622
1622
  this._registerRecursively(this.normalizeCollection({
1623
1623
  ...subCollection
1624
- }), cloneDeep(subCollection));
1624
+ }), utils.deepClone(subCollection));
1625
1625
  });
1626
1626
  }
1627
1627
  });
@@ -1629,7 +1629,7 @@
1629
1629
  return true;
1630
1630
  }
1631
1631
  register(collection, rawCollection) {
1632
- const raw = rawCollection ? cloneDeep(rawCollection) : cloneDeep(collection);
1632
+ const raw = rawCollection ? utils.deepClone(rawCollection) : utils.deepClone(collection);
1633
1633
  this.rootCollections.push(collection);
1634
1634
  this.rawRootCollections.push(raw);
1635
1635
  this._registerRecursively(collection, raw);
@@ -1653,7 +1653,7 @@
1653
1653
  if (!subCollection) return;
1654
1654
  this._registerRecursively(this.normalizeCollection({
1655
1655
  ...subCollection
1656
- }), cloneDeep(subCollection));
1656
+ }), utils.deepClone(subCollection));
1657
1657
  });
1658
1658
  }
1659
1659
  }