MCPcopy Index your code
hub / github.com/angular-ui/ui-grid / isArrayLike

Function isArrayLike

lib/test/angular/1.4.3/angular.js:269–284  ·  view source on GitHub ↗

* @private * @param {*} obj * @return {boolean} Returns true if `obj` is an array or array-like object (NodeList, Arguments, * String ...)

(obj)

Source from the content-addressed store, hash-verified

267 * String ...)
268 */
269function isArrayLike(obj) {
270 if (obj == null || isWindow(obj)) {
271 return false;
272 }
273
274 // Support: iOS 8.2 (not reproducible in simulator)
275 // "length" in obj used to prevent JIT error (gh-11508)
276 var length = "length" in Object(obj) && obj.length;
277
278 if (obj.nodeType === NODE_TYPE_ELEMENT && length) {
279 return true;
280 }
281
282 return isString(obj) || isArray(obj) || length === 0 ||
283 typeof length === 'number' && length > 0 && (length - 1) in obj;
284}
285
286/**
287 * @ngdoc function

Callers 7

forEachFunction · 0.70
$watchCollectionActionFunction · 0.70
filterFilterFunction · 0.70
orderByFilterFunction · 0.70
getOptionValuesKeysFunction · 0.70
angular.jsFile · 0.70

Calls 3

isWindowFunction · 0.70
isStringFunction · 0.70
isArrayFunction · 0.50

Tested by

no test coverage detected