Skip to main content

core.ispopulated

Home > @medplum/core > isPopulated

isPopulated() function

Returns true if the value is a non-empty string, an object with a length property greater than zero, or a non-empty object

Signature:

export declare function isPopulated<T extends {
length: number;
} | object>(arg: CanBePopulated | undefined | null): arg is T;

Parameters

Parameter

Type

Description

arg

CanBePopulated | undefined | null

Any value

Returns:

arg is T

True if the value is a non-empty string, an object with a length property greater than zero, or a non-empty object