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

Function isArraylike

2.1.1/test/core.js:496–510  ·  view source on GitHub ↗
( obj )

Source from the content-addressed store, hash-verified

494});
495
496function isArraylike( obj ) {
497 var length = obj.length,
498 type = jQuery.type( obj );
499
500 if ( type === "function" || jQuery.isWindow( obj ) ) {
501 return false;
502 }
503
504 if ( obj.nodeType === 1 && length ) {
505 return true;
506 }
507
508 return type === "array" || length === 0 ||
509 typeof length === "number" && length > 0 && ( length - 1 ) in obj;
510}

Callers 1

core.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected