1 var getLength = require('../internal/getLength'),
2 isArguments = require('./isArguments'),
3 isArray = require('./isArray'),
4 isFunction = require('./isFunction'),
5 isLength = require('../internal/isLength'),
6 isObjectLike = require('../internal/isObjectLike'),
7 isString = require('./isString'),
8 keys = require('../object/keys');
11 * Checks if `value` is empty. A value is considered empty unless it is an
12 * `arguments` object, array, string, or jQuery-like collection with a length
13 * greater than `0` or an object with own enumerable properties.
18 * @param {Array|Object|string} value The value to inspect.
19 * @returns {boolean} Returns `true` if `value` is empty, else `false`.
31 * _.isEmpty([1, 2, 3]);
34 * _.isEmpty({ 'a': 1 });
37 function isEmpty(value) {
41 var length = getLength(value);
42 if (isLength(length) && (isArray(value) || isString(value) || isArguments(value) ||
43 (isObjectLike(value) && isFunction(value.splice)))) {
46 return !keys(value).length;
49 module.exports = isEmpty;