MCPcopy Create free account
hub / github.com/JsAaron/jQuery / isArraylike

Function isArraylike

2.1.1/src/core.js:464–478  ·  view source on GitHub ↗
(obj)

Source from the content-addressed store, hash-verified

462 });
463
464 function isArraylike(obj) {
465 var length = obj.length,
466 type = jQuery.type(obj);
467
468 if (type === "function" || jQuery.isWindow(obj)) {
469 return false;
470 }
471
472 if (obj.nodeType === 1 && length) {
473 return true;
474 }
475
476 return type === "array" || length === 0 ||
477 typeof length === "number" && length > 0 && (length - 1) in obj;
478 }
479
480 return jQuery;
481});

Callers 1

core.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected