* @private * @param {*} obj * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, * String ...)
(obj)
| 246 | * String ...) |
| 247 | */ |
| 248 | function isArrayLike(obj) { |
| 249 | if (obj == null || isWindow(obj)) { |
| 250 | return false; |
| 251 | } |
| 252 | |
| 253 | var length = obj.length; |
| 254 | |
| 255 | if (obj.nodeType === 1 && length) { |
| 256 | return true; |
| 257 | } |
| 258 | |
| 259 | return isString(obj) || isArray(obj) || length === 0 || |
| 260 | typeof length === 'number' && length > 0 && (length - 1) in obj; |
| 261 | } |
| 262 | |
| 263 | /** |
| 264 | * @ngdoc function |
no test coverage detected
searching dependent graphs…