isDefined
Validates if the supplied input is defined.
Signature
isDefined(input: any): boolean
Parameters
Name | Type | Optional | Description |
---|---|---|---|
input | any | No | Input to validate. |
Return value
Returns true
if the input is defined.
Example
import { isDefined } from "@tripetto/runner";
isDefined(1); // Returns `true`
isDefined(); // Returns `false`