1 var getLength = require('./internal/getLength'),
2 isFunction = require('./isFunction'),
3 isLength = require('./isLength');
6 * Checks if `value` is array-like. A value is considered array-like if it's
7 * not a function and has a `value.length` that's an integer greater than or
8 * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
14 * @param {*} value The value to check.
15 * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
18 * _.isArrayLike([1, 2, 3]);
21 * _.isArrayLike(document.body.children);
24 * _.isArrayLike('abc');
27 * _.isArrayLike(_.noop);
30 function isArrayLike(value) {
31 return value != null &&
32 !(typeof value == 'function' && isFunction(value)) && isLength(getLength(value));
35 module.exports = isArrayLike;