# Module: isEqual
Compares two objects and returns whether their values are equivalent
import { isEqual } from 'utilist';
isEqual({ key: 'value' }, { key: 'value' }); // returns true
isEqual({ key: 'value' }, { anotherKey: 'another value' }); // returns false
# Functions
# isEqual
▸ isEqual‹T›(first
: T, second
: T): boolean
Defined in src/is-equal.ts:21
Type parameters:
▪ T: object
Type of objects to compare. Both of them have to be of the same type. Type has to extend the standard, generic JavaScript object (with strings as keys).
Parameters:
Name | Type | Description |
---|---|---|
first | T | The first object to compare |
second | T | The second object to compare |
Returns: boolean