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: unknown): value is object;
Usage
import { isObject } from '@feedzai/js-utilities';
isObject({})
// true
isObject([1, 2, 3])
// true
isObject(() => {})
// true
isObject(null)
// false