asv-hlps 1.3.31 → 1.3.32
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/lib/cjs/utils.js +2 -1
- package/lib/esm/utils.js +2 -1
- package/package.json +1 -1
package/lib/cjs/utils.js
CHANGED
|
@@ -248,7 +248,8 @@ const diffArraysByFunc = (arr1, arr2, func) => {
|
|
|
248
248
|
};
|
|
249
249
|
exports.diffArraysByFunc = diffArraysByFunc;
|
|
250
250
|
const diffArraysByProp = (arr1, arr2, propArr1 = "id", propArr2 = "id") => {
|
|
251
|
-
return
|
|
251
|
+
// return lodash.differenceWith(arr1, arr2, (a, b) => lodash.isEqual(a[propArr1], b[propArr2]));
|
|
252
|
+
return lodash_1.default.differenceWith(arr1, arr2, (a, b) => lodash_1.default.isEqual(lodash_1.default.get(a, propArr1), lodash_1.default.get(b, propArr2)));
|
|
252
253
|
};
|
|
253
254
|
exports.diffArraysByProp = diffArraysByProp;
|
|
254
255
|
const removeString = (text, word) => {
|
package/lib/esm/utils.js
CHANGED
|
@@ -216,7 +216,8 @@ export const diffArraysByFunc = (arr1, arr2, func) => {
|
|
|
216
216
|
return lodash.differenceBy(arr1, arr2, func);
|
|
217
217
|
};
|
|
218
218
|
export const diffArraysByProp = (arr1, arr2, propArr1 = "id", propArr2 = "id") => {
|
|
219
|
-
return lodash.differenceWith(arr1, arr2, (a, b) => lodash.isEqual(a[propArr1], b[propArr2]));
|
|
219
|
+
// return lodash.differenceWith(arr1, arr2, (a, b) => lodash.isEqual(a[propArr1], b[propArr2]));
|
|
220
|
+
return lodash.differenceWith(arr1, arr2, (a, b) => lodash.isEqual(lodash.get(a, propArr1), lodash.get(b, propArr2)));
|
|
220
221
|
};
|
|
221
222
|
export const removeString = (text, word) => {
|
|
222
223
|
return text.toLowerCase().replace(word.toLowerCase(), "") || text;
|