core.getpathdifference
Home > @medplum/core > getPathDifference
getPathDifference() function
Returns the difference between two paths which is often suitable to use as a key in a Record<string, InternalSchemaElement>
Signature:
export declare function getPathDifference(parentPath: string, path: string): string | undefined;
Parameters
Parameter | Type | Description |
---|---|---|
parentPath | string | The parent path that will be removed from |
path | string | The element path that should be a child of |
Returns:
string | undefined
- The difference between
path
andparentPath
orundefined
ifpath
is not a child ofparentPath
.