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 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 lodash_1.default.differenceWith(arr1, arr2, (a, b) => lodash_1.default.isEqual(a[propArr1], b[propArr2]));
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.3.31",
3
+ "version": "1.3.32",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",