MCPcopy Create free account
hub / github.com/TruthHun/BookStack / isArrayLike

Function isArrayLike

static/webuploader/webuploader.flashonly.js:1398–1413  ·  view source on GitHub ↗
( obj )

Source from the content-addressed store, hash-verified

1396 widgetClass = [];
1397
1398 function isArrayLike( obj ) {
1399 if ( !obj ) {
1400 return false;
1401 }
1402
1403 var length = obj.length,
1404 type = $.type( obj );
1405
1406 if ( obj.nodeType === 1 && length ) {
1407 return true;
1408 }
1409
1410 return type === 'array' || type !== 'function' && type !== 'string' &&
1411 (length === 0 || typeof length === 'number' && length > 0 &&
1412 (length - 1) in obj);
1413 }
1414
1415 function Widget( uploader ) {
1416 this.owner = uploader;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected