Skip to main content

isObject

Validates if the supplied input is an object and is available (not null or undefined).

Signature

isObject(input: any): boolean

Parameters

NameTypeOptionalDescription
inputanyNoInput to validate.

Return value

Returns true if the input is an object.

Example

import { isObject } from "@tripetto/builder";

isObject({}); // Returns `true`
isObject([]); // Returns `false`
isObject(null); // Returns `false`
isObject(undefined); // Returns `false`