isObject
Validates if the supplied input is an object and is available (not null
or undefined
).
Signature
isObject(input: any): boolean
Parameters
Name | Type | Optional | Description |
---|---|---|---|
input | any | No | Input to validate. |
Return value
Returns true
if the input is an object.
Example
import { isObject } from "@tripetto/runner";
isObject({}); // Returns `true`
isObject([]); // Returns `false`
isObject(null); // Returns `false`
isObject(undefined); // Returns `false`