Skip to main content

isObject

Checks if value is the language type of Object. (e.g. arrays, functions, objects, regexes, new Number(0), and new String(’’))

API

function isObject(value?: any): value is object;

Usage

import { isObject } from '@jtmdias/js-utilities';

isObject({})
// true

isObject([1, 2, 3])
// true

isObject(() => {})
// true

isObject(null)
// false