41993db213eb692ea1cef71caa9b5ecef84ff413
[yaffs-website] / node_modules / grunt-legacy-log-utils / node_modules / lodash / isObject.js
1 /**
2  * Checks if `value` is the [language type](https://es5.github.io/#x8) of `Object`.
3  * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
4  *
5  * @static
6  * @memberOf _
7  * @category Lang
8  * @param {*} value The value to check.
9  * @returns {boolean} Returns `true` if `value` is an object, else `false`.
10  * @example
11  *
12  * _.isObject({});
13  * // => true
14  *
15  * _.isObject([1, 2, 3]);
16  * // => true
17  *
18  * _.isObject(_.noop);
19  * // => true
20  *
21  * _.isObject(null);
22  * // => false
23  */
24 function isObject(value) {
25   var type = typeof value;
26   return !!value && (type == 'object' || type == 'function');
27 }
28
29 module.exports = isObject;