Home > @rushstack/lookup-by-path > getFirstDifferenceInCommonNodes
getFirstDifferenceInCommonNodes() function
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Recursively compares two path tries to find the first shared node with a different value.
Signature:
export declare function getFirstDifferenceInCommonNodes<TItem extends {}>(options: IGetFirstDifferenceInCommonNodesOptions<TItem>): string | undefined;
Parameters
Parameter | Type | Description |
|---|---|---|
options | The options for the comparison |
Returns:
string | undefined
The path to the first differing node, or undefined if they are identical
Remarks
Ignores any nodes that are not shared between the two tries.