dce-reactkit 3.5.2 → 3.5.3
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/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/compareArraysByProp.test.ts +45 -0
- package/src/helpers/compareArraysByProp.ts +2 -5
- package/src/helpers/getTimeInfoInET.test.ts +2 -2
- package/src/helpers/validators/validateString.test.ts +0 -2
package/dist/esm/index.js
CHANGED
|
@@ -41736,7 +41736,6 @@ const extractProp = (arr, prop) => {
|
|
|
41736
41736
|
});
|
|
41737
41737
|
};
|
|
41738
41738
|
|
|
41739
|
-
// Import shared helpers
|
|
41740
41739
|
/**
|
|
41741
41740
|
* Compare two arrays of objects by only comparing the values in a specific
|
|
41742
41741
|
* property (e.g. compare user arrays by comparing their user.id values)
|
|
@@ -41763,8 +41762,9 @@ const compareArraysByProp = (a, b, prop) => {
|
|
|
41763
41762
|
const matchingIndex = bCloned.findIndex((bItem) => {
|
|
41764
41763
|
// Compare based on all props
|
|
41765
41764
|
return props.every((propToCompareBy) => {
|
|
41766
|
-
|
|
41767
|
-
const
|
|
41765
|
+
var _a;
|
|
41766
|
+
const aVal = ((_a = a[i]) !== null && _a !== void 0 ? _a : {})[propToCompareBy];
|
|
41767
|
+
const bVal = (bItem !== null && bItem !== void 0 ? bItem : {})[propToCompareBy];
|
|
41768
41768
|
return aVal === bVal;
|
|
41769
41769
|
});
|
|
41770
41770
|
});
|