deep-compare-objects
Version:
Deeply compare objects and identify their differences.
10 lines (9 loc) • 488 B
TypeScript
/**
* Finds and returns the differences between two objects `a` and `b`.
*
* @param {Record<string, any>} [a] The first object to compare.
* @param {Record<string, any>} [b] The second object to compare.
*
* @returns {Record<string, any> | undefined} An object containing the differences between `a` and `b`, or undefined if `b` is null or undefined.
*/
export default function deepCompareObjects(a?: Record<string, any>, b?: Record<string, any>): Record<string, any> | undefined;