Compares two objects following the idea that one object is shallowly equal to another if each property of this object is equal to each property of another.
the first object to compare
the second object to compare
result of the comparison
const objA = {foo: 1, bar: 2};
const objB = {foo: 1, bar: 2};
const objC = {foo: 1, baz: 2};
shallowEqual(objA, objB); // true
shallowEqual(objA, objC); // false
Generated using TypeDoc
This module provides tools to compare object shallowly.
Usage
import shallowEqual from '@corpuscule/utils/lib/shallowEqual'