Skip to main content

isDefined

Validates if the supplied input is defined.

Signature

isDefined(input: any): boolean

Parameters

NameTypeOptionalDescription
inputanyNoInput to validate.

Return value

Returns true if the input is defined.

Example

import { isDefined } from "@tripetto/runner";

isDefined(1); // Returns `true`
isDefined(); // Returns `false`