1 var getNative = require('../internal/getNative'),
2 isLength = require('../internal/isLength'),
3 isObjectLike = require('../internal/isObjectLike');
5 /** `Object#toString` result references. */
6 var arrayTag = '[object Array]';
8 /** Used for native method references. */
9 var objectProto = Object.prototype;
12 * Used to resolve the [`toStringTag`](http://ecma-international.org/ecma-262/6.0/#sec-object.prototype.tostring)
15 var objToString = objectProto.toString;
17 /* Native method references for those with the same name as other `lodash` methods. */
18 var nativeIsArray = getNative(Array, 'isArray');
21 * Checks if `value` is classified as an `Array` object.
26 * @param {*} value The value to check.
27 * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`.
30 * _.isArray([1, 2, 3]);
33 * _.isArray(function() { return arguments; }());
36 var isArray = nativeIsArray || function(value) {
37 return isObjectLike(value) && isLength(value.length) && objToString.call(value) == arrayTag;
40 module.exports = isArray;