@grnsft/if
Version:
Impact Framework
11 lines (10 loc) • 497 B
TypeScript
import { Difference } from '../types/compare';
/**
* 1. If objects are not of the same type or are primitive types, compares directly.
* 2. Gets the keys from both objects.
* 3. If both are arrays, checks their elements.
* 4. Checks for keys present in both objects.
* If key is `execution`, omit unnecessary params.
* 5. If all keys are checked and no differences are found, return empty object.
*/
export declare const compare: (source: any, target: any, path?: string) => Difference;