* @private * @param {*} obj * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, * String ...)
(obj)
| 273 | * String ...) |
| 274 | */ |
| 275 | function isArrayLike(obj) { |
| 276 | if (obj == null || isWindow(obj)) { |
| 277 | return false; |
| 278 | } |
| 279 | |
| 280 | var length = obj.length; |
| 281 | |
| 282 | if (obj.nodeType === NODE_TYPE_ELEMENT && length) { |
| 283 | return true; |
| 284 | } |
| 285 | |
| 286 | return isString(obj) || isArray(obj) || length === 0 || |
| 287 | typeof length === 'number' && length > 0 && (length - 1) in obj; |
| 288 | } |
| 289 | |
| 290 | /** |
| 291 | * @ngdoc function |
no test coverage detected