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

Function isArrayLike

static/webuploader/webuploader.withoutimage.js:1216–1231  ·  view source on GitHub ↗
( obj )

Source from the content-addressed store, hash-verified

1214 widgetClass = [];
1215
1216 function isArrayLike( obj ) {
1217 if ( !obj ) {
1218 return false;
1219 }
1220
1221 var length = obj.length,
1222 type = $.type( obj );
1223
1224 if ( obj.nodeType === 1 && length ) {
1225 return true;
1226 }
1227
1228 return type === 'array' || type !== 'function' && type !== 'string' &&
1229 (length === 0 || typeof length === 'number' && length > 0 &&
1230 (length - 1) in obj);
1231 }
1232
1233 function Widget( uploader ) {
1234 this.owner = uploader;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected