The value to compare.
The other value to compare.
Optional
customizer: IsEqualCustomizerThe function to customize comparisons.
Returns true
if the values are equivalent, else false
.
function isGreeting(value) {
return /^h(?:i|ello)$/.test(value);
}
function customizer(objValue, othValue) {
if (isGreeting(objValue) && isGreeting(othValue)) {
return true;
}
}
var array = ['hello', 'goodbye'];
var other = ['hi', 'goodbye'];
_.isEqualWith(array, other, customizer);
// => true
Generated using TypeDoc
This method is like
_.isEqual
except that it acceptscustomizer
which is invoked to compare values. Ifcustomizer
returnsundefined
comparisons are handled by the method instead. Thecustomizer
is invoked with up to seven arguments: (objValue, othValue [, index|key, object, other, stack]).