# \_.isEqualWith（两值是否相等）

**语法：**

```javascript
_.isEqualWith(value, other, [customizer])
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L11566)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.isequalwith)

**描述：**

这个方法类似[`_.isEqual`](https://lodash.com/docs/4.17.10#isEqual)。 除了它接受一个`customizer`用来定制比较值。 如果`customizer`返回`undefined`将会比较处理方法代替。`customizer`会传入6个参数：*(objValue, othValue \[, index|key, object, other, stack])*

**开始版本：**&#x34;.0.0

**参数：**

* `value (*)`: 用来比较的值。
* `other (*)`: 另一个用来比较的值。
* `[customizer] (Function)`: 用来定制比较值的函数。 **返回值：**
* `(boolean)`: 如果 两个值完全相同，那么返回 true，否则返回 false。

**例子：**

```javascript
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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lodash.shujuwajue.com/lang/isequalwith.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
