Skip to main content

core.deepincludes

Home > @medplum/core > deepIncludes

deepIncludes() function

Checks if value includes all fields and values of pattern. It doesn't matter if value has extra fields, values, etc.

Signature:

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

Parameters

ParameterTypeDescription
valueanyThe object being tested against pattern.
patternanyThe object pattern/shape checked to exist within value.

Returns:

boolean

True if value includes all fields and values of pattern.