Check if a value is an object
Keep in mind that array, function, regexp, etc, are objects in JavaScript.
See is-plain-obj if you want to check for plain objects.
$ npm install is-obj
import isObject from 'is-obj';
isObject({foo: 'bar'});
//=> true
isObject([1, 2, 3]);
//=> true
isObject('foo');
//=> false
Overall
Maintained
Code review
npm
Latest release
Releases this year
1,655 followers · starred Jul 2015
Check if a value is an object
Keep in mind that array, function, regexp, etc, are objects in JavaScript.
See is-plain-obj if you want to check for plain objects.
$ npm install is-obj
import isObject from 'is-obj';
isObject({foo: 'bar'});
//=> true
isObject([1, 2, 3]);
//=> true
isObject('foo');
//=> false
Overall
Maintained
Code review
npm
Latest release
Releases this year
1,655 followers · starred Jul 2015