MCPcopy
hub / github.com/jquery/jquery / jQueryFactoryWrapper

Function jQueryFactoryWrapper

dist-module/jquery.factory.slim.module.js:18–6847  ·  view source on GitHub ↗
( window, noGlobal )

Source from the content-addressed store, hash-verified

16//
17// See ticket trac-14549 for more info.
18function jQueryFactoryWrapper( window, noGlobal ) {
19
20if ( !window.document ) {
21 throw new Error( "jQuery requires a window with a document" );
22}
23
24var arr = [];
25
26var getProto = Object.getPrototypeOf;
27
28var slice = arr.slice;
29
30// Support: IE 11+
31// IE doesn't have Array#flat; provide a fallback.
32var flat = arr.flat ? function( array ) {
33 return arr.flat.call( array );
34} : function( array ) {
35 return arr.concat.apply( [], array );
36};
37
38var push = arr.push;
39
40var indexOf = arr.indexOf;
41
42// [[Class]] -> type pairs
43var class2type = {};
44
45var toString = class2type.toString;
46
47var hasOwn = class2type.hasOwnProperty;
48
49var fnToString = hasOwn.toString;
50
51var ObjectFunctionString = fnToString.call( Object );
52
53// All support tests are defined in their respective modules.
54var support = {};
55
56function toType( obj ) {
57 if ( obj == null ) {
58 return obj + "";
59 }
60
61 return typeof obj === "object" ?
62 class2type[ toString.call( obj ) ] || "object" :
63 typeof obj;
64}
65
66function isWindow( obj ) {
67 return obj != null && obj === obj.window;
68}
69
70function isArrayLike( obj ) {
71
72 var length = !!obj && obj.length,
73 type = toType( obj );
74
75 if ( typeof obj === "function" || isWindow( obj ) ) {

Callers 1

jQueryFactoryFunction · 0.70

Calls 15

DOMEvalFunction · 0.70
isArrayLikeFunction · 0.70
createCacheFunction · 0.70
unescapeSelectorFunction · 0.70
selectorErrorFunction · 0.70
tokenizeFunction · 0.70
accessFunction · 0.70
nodeNameFunction · 0.70
addCombinatorFunction · 0.70
findFunction · 0.70
setDocumentFunction · 0.70
markFunctionFunction · 0.70

Tested by

no test coverage detected