MCPcopy Index your code
hub / github.com/jquery/jquery / isArrayLike

Function isArrayLike

src/core/isArrayLike.js:4–15  ·  view source on GitHub ↗
( obj )

Source from the content-addressed store, hash-verified

2import { isWindow } from "../var/isWindow.js";
3
4export function isArrayLike( obj ) {
5
6 var length = !!obj && obj.length,
7 type = toType( obj );
8
9 if ( typeof obj === "function" || isWindow( obj ) ) {
10 return false;
11 }
12
13 return type === "array" || length === 0 ||
14 typeof length === "number" && length > 0 && ( length - 1 ) in obj;
15}

Callers 2

core.jsFile · 0.90
buildFragmentFunction · 0.90

Calls 2

toTypeFunction · 0.90
isWindowFunction · 0.90

Tested by

no test coverage detected