_.isObjectLike

_.isObjectLike(value)

Checks if value is object-like. A value is object-like if it's not null and has a typeof result of "object".

Since

4.0.0

Arguments

  1. value (*): The value to check.

Returns

(boolean): Returns true if value is object-like, else false.

Example

_.isObjectLike({});
// => true
 
_.isObjectLike([1, 2, 3]);
// => true
 
_.isObjectLike(_.noop);
// => false
 
_.isObjectLike(null);
// => false
doc_Lodash
2016-11-27 16:38:24
Comments
Leave a Comment

Please login to continue.