Performs a deep comparison to determine if two variables of any type are equal.
Parameters:
Name | Type | Description |
---|---|---|
a | * | The first variable to compare. |
b | * | The second variable to compare. |
- Since
- 3.1.0
- Source
Returns:
Returns true if the specified variables are equal. Returns false otherwise.
- Type:
- boolean
Example
import { isEqual } from "@gravityforms/utils";
function Example() {
const obj1 = { prop: 'val' };
const obj2 = { prop: 'val2' };
const equal = isEqual( obj1, obj2 );
}