79805906

Date: 2025-10-31 14:51:27
Score: 0.5
Natty:
Report link

With _.intersectionWith available since Lodash 4.0.0, you can use this:

function customizer(objValue, othValue) {
  return objValue.user === othValue.user && objValue.age === othValue.age;
}

result = _.intersectionWith(users, others, (value, other) => _.isEqualWith(value, other, customizer));

or a one-liner

result = _.intersectionWith(users, others, (n, n2) => { return n.user === n2.user && n.age === n2.age; });

You can check the results in this edited jsbin. https://jsbin.com/xonojiluga/1/edit?js,console,output

Reasons:
  • Whitelisted phrase (-1.5): you can use
  • Probably link only (1):
  • Contains signature (1):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Wit