@firestitch/common 12.2.2 → 12.3.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.
@@ -1794,6 +1794,28 @@
1794
1794
  return obj;
1795
1795
  }
1796
1796
 
1797
+ function isArrayEqual(arr1, arr2) {
1798
+ if (!Array.isArray(arr1) || !Array.isArray(arr2) || arr1.length !== arr2.length) {
1799
+ return false;
1800
+ }
1801
+ var sortFn = function (a, b) {
1802
+ if (a < b) {
1803
+ return -1;
1804
+ }
1805
+ else if (a > b) {
1806
+ return 1;
1807
+ }
1808
+ else {
1809
+ return 0;
1810
+ }
1811
+ };
1812
+ arr1 = __spreadArray([], __read(arr1)).sort(sortFn);
1813
+ arr2 = __spreadArray([], __read(arr2)).sort(sortFn);
1814
+ return arr1.every(function (value, index) {
1815
+ return value === arr2[index];
1816
+ });
1817
+ }
1818
+
1797
1819
  function acronym(str, length) {
1798
1820
  if (length === void 0) { length = 2; }
1799
1821
  var splittedString = str
@@ -1931,6 +1953,7 @@
1931
1953
  exports.inArray = inArray;
1932
1954
  exports.index = index;
1933
1955
  exports.indexOf = indexOf;
1956
+ exports.isArrayEqual = isArrayEqual;
1934
1957
  exports.isClass = isClass;
1935
1958
  exports.isEmpty = isEmpty;
1936
1959
  exports.isNumeric = isNumeric;