Skip to main content

core.deepincludes

Home > @medplum/core > deepIncludes

deepIncludes() function

Checks if object2 includes all fields and values of object1. It doesn't matter if object2 has extra fields.

Signature:

export declare function deepIncludes(value: any, pattern: any): boolean;

Parameters

ParameterTypeDescription
valueanyThe object to test if contained in pattern.
patternanyThe object to test against.

Returns:

boolean

True if pattern includes all fields and values of value.