通知短信+运营短信,5秒速达,支持群发助手一键发送🚀高效触达和通知客户 广告
## isEqualWith + [link](./isEqualWith "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L9760 "View in source.") + [npm](https://www.npmjs.com/package/lodash.isequalwith "See the npm package.") ``` _.isEqualWith(value, other, [customizer]) ``` 这个方法类似 `_.isEqual`。 除了它接受一个 customizer 定制比较值。 如果 customizer 返回 undefined 将会比较处理方法代替。 `customizer` 会传入7个参数:(objValue, othValue [, index|key, object, other, stack]) ### 参数 1. value (\*) 要比较的值 2. other (\*) 其他要比较的值 3. [customizer] (Function) 这个函数定制比较值 ### 返回值 (boolean) 如果相等返回 `true`,否则返回 `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 ```