PATH:
usr
/
local
/
lib
/
node_modules
/
bower
/
lib
/
node_modules
/
inquirer
/
node_modules
/
lodash
/
lang
var isArguments = require('./isArguments'), isArray = require('./isArray'), isArrayLike = require('../internal/isArrayLike'), isFunction = require('./isFunction'), isObjectLike = require('../internal/isObjectLike'), isString = require('./isString'), keys = require('../object/keys'); /** * Checks if `value` is empty. A value is considered empty unless it's an * `arguments` object, array, string, or jQuery-like collection with a length * greater than `0` or an object with own enumerable properties. * * @static * @memberOf _ * @category Lang * @param {Array|Object|string} value The value to inspect. * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * * _.isEmpty(null); * // => true * * _.isEmpty(true); * // => true * * _.isEmpty(1); * // => true * * _.isEmpty([1, 2, 3]); * // => false * * _.isEmpty({ 'a': 1 }); * // => false */ function isEmpty(value) { if (value == null) { return true; } if (isArrayLike(value) && (isArray(value) || isString(value) || isArguments(value) || (isObjectLike(value) && isFunction(value.splice)))) { return !value.length; } return !keys(value).length; } module.exports = isEmpty;
[-] isBoolean.js
[edit]
[-] isRegExp.js
[edit]
[-] toArray.js
[edit]
[-] gt.js
[edit]
[+]
..
[-] isNative.js
[edit]
[-] isFinite.js
[edit]
[-] isObject.js
[edit]
[-] isUndefined.js
[edit]
[-] isDate.js
[edit]
[-] isError.js
[edit]
[-] isPlainObject.js
[edit]
[-] isTypedArray.js
[edit]
[-] toPlainObject.js
[edit]
[-] isArguments.js
[edit]
[-] eq.js
[edit]
[-] isElement.js
[edit]
[-] gte.js
[edit]
[-] isString.js
[edit]
[-] isNull.js
[edit]
[-] cloneDeep.js
[edit]
[-] lt.js
[edit]
[-] lte.js
[edit]
[-] isNumber.js
[edit]
[-] isNaN.js
[edit]
[-] isArray.js
[edit]
[-] isMatch.js
[edit]
[-] isEmpty.js
[edit]
[-] isFunction.js
[edit]
[-] clone.js
[edit]
[-] isEqual.js
[edit]