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.