* @private * @param {*} obj * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, * String ...)
(obj)
| 255 | * String ...) |
| 256 | */ |
| 257 | function isArrayLike(obj) { |
| 258 | if (obj == null || isWindow(obj)) { |
| 259 | return false; |
| 260 | } |
| 261 | |
| 262 | var length = obj.length; |
| 263 | |
| 264 | if (obj.nodeType === NODE_TYPE_ELEMENT && length) { |
| 265 | return true; |
| 266 | } |
| 267 | |
| 268 | return isString(obj) || isArray(obj) || length === 0 || |
| 269 | typeof length === 'number' && length > 0 && (length - 1) in obj; |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * @ngdoc function |
no test coverage detected