<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@easyops-cn/brick-next-pipes](./brick-next-pipes.md) &gt; [equal](./brick-next-pipes.equal.md)

## equal() function

比较两个值是否相同（深度比较）。

 Logic

**Signature:**

```typescript
export declare function equal(value: unknown, other: unknown): boolean;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | unknown | 被比较的值。 |
|  other | unknown | 比较值。 |

**Returns:**

boolean

如果两者相同返回 `true`<!-- -->，否则返回 `false`<!-- -->。

## Remarks

透传调用 [\_.isEqual](https://lodash.com/docs/#isEqual)<!-- -->。

\*\*Note:\*\* This method supports comparing arrays, array buffers, booleans, date objects, error objects, maps, numbers, `Object` objects, regexes, sets, strings, symbols, and typed arrays. `Object` objects are compared by their own, not inherited, enumerable properties. Functions and DOM nodes are \*\*not\*\* supported.

## Example


```ts
let object = { 'user': 'fred' };
let other = { 'user': 'fred' };

equal(object, other);
// => true

object === other;
// => false
```


