Checks if `value` is object-like. A value is object-like if it's not `null` and has a `typeof` result of "object".
isObjectLike({})
// => true
isObjectLike([1, 2, 3])
// => true
isObjectLike(Function)
// => false
isObjectLike(null)
// => false
Name | Type | Attribute | Description |
---|---|---|---|
value | The value to check. |
{ "comment": "/**\r\n * Checks if `value` is object-like. A value is object-like if it's not `null`\r\n * and has a `typeof` result of \"object\".\r\n *\r\n * @since 4.0.0\r\n * @category Lang\r\n * @param {*} value The value to check.\r\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\r\n * @example\r\n *\r\n * isObjectLike({})\r\n * // => true\r\n *\r\n * isObjectLike([1, 2, 3])\r\n * // => true\r\n *\r\n * isObjectLike(Function)\r\n * // => false\r\n *\r\n * isObjectLike(null)\r\n * // => false\r\n */", "meta": { "range": [ 483, 568 ], "filename": "isObjectLike.js", "lineno": 23, "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo", "code": { "id": "astnode100005054", "name": "isObjectLike", "type": "FunctionDeclaration", "paramnames": [ "value" ] } }, "description": "Checks if `value` is object-like. A value is object-like if it's not `null`\rand has a `typeof` result of \"object\".", "since": "4.0.0", "tags": [ { "originalTitle": "category", "title": "category", "text": "Lang", "value": "Lang" } ], "params": [ { "type": { "names": [ "*" ] }, "description": "The value to check.", "name": "value" } ], "returns": [ { "type": { "names": [ "boolean" ] }, "description": "Returns `true` if `value` is object-like, else `false`." } ], "examples": [ "isObjectLike({})\r// => true\r\risObjectLike([1, 2, 3])\r// => true\r\risObjectLike(Function)\r// => false\r\risObjectLike(null)\r// => false" ], "name": "isObjectLike", "longname": "isObjectLike", "kind": "function", "scope": "global", "___id": "T000002R000483", "___s": true, "filepath": "isObjectLike.js" }