Skip to content

isObject

Determine if a value is an Object

128 bytes

Usage

Pass in a value and get a boolean telling you if the value is an instance of Object (or a subclass of Object).

import * as _ from 'radashi'
_.isObject('hello') // => false
_.isObject(['hello']) // => false
_.isObject(null) // => false
_.isObject({ say: 'hello' }) // => true

Beware: This function returns false for objects created with Object.create(null). If you want to check if a value is a plain object, use _.isPlainObject instead.