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

Parameter

Type

Description

value

any

The object being tested against pattern.

pattern

any

The object pattern/shape checked to exist within value.

Returns:

boolean

True if value includes all fields and values of pattern.