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