Skip to content

isObject() function

Checks if value is the type of object.

Signature:

typescript
isObject: <T>(input: T) => input is T & object

Example

ts
isObject({}); // true
isObject([1, 2, 3]); // true
isObject(() => {}); // true
isObject(null); // false
isObject(123); // false

Open Source Code

Released under the Apache-2.0 License.