You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// when when somebody has screwed with setTimeout but no I.E. maddness
58
+
returncachedSetTimeout(fun,0);
59
+
}catch(e){
60
+
try{
61
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
62
+
returncachedSetTimeout.call(null,fun,0);
63
+
}catch(e){
64
+
// eslint-disable-line no-shadow
65
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
66
+
returncachedSetTimeout.call(this,fun,0);
67
+
}
68
+
}
69
+
}
70
+
functionrunClearTimeout(marker){
71
+
if(cachedClearTimeout===clearTimeout){
72
+
// normal enviroments in sane situations
73
+
returnclearTimeout(marker);
74
+
}
75
+
// if clearTimeout wasn't available but was latter defined
// when when somebody has screwed with setTimeout but no I.E. maddness
85
+
returncachedClearTimeout(marker);
86
+
}catch(e){
87
+
try{
88
+
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
89
+
returncachedClearTimeout.call(null,marker);
90
+
}catch(e){
91
+
// eslint-disable-line no-shadow
92
+
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
93
+
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
94
+
returncachedClearTimeout.call(this,marker);
95
+
}
96
+
}
97
+
}
98
+
functiondrainQueue(){
99
+
if(draining){
100
+
return;
101
+
}
102
+
// eslint-disable-next-line no-use-before-define
103
+
consttimeout=runTimeout(cleanUpNextTick);
104
+
draining=true;
105
+
106
+
letlen=queue.length;
107
+
while(len){
108
+
currentQueue=queue;
109
+
queue=[];
110
+
while(++queueIndex<len){
111
+
if(currentQueue){
112
+
currentQueue[queueIndex].run();
113
+
}
114
+
}
115
+
queueIndex=-1;
116
+
len=queue.length;
117
+
}
118
+
currentQueue=null;
119
+
draining=false;
120
+
runClearTimeout(timeout);
121
+
}
122
+
functioncleanUpNextTick(){
123
+
if(!draining||!currentQueue){
124
+
return;
125
+
}
126
+
draining=false;
127
+
if(currentQueue.length){
128
+
queue=currentQueue.concat(queue);
129
+
}else{
130
+
queueIndex=-1;
131
+
}
132
+
if(queue.length){
133
+
drainQueue();
134
+
}
135
+
}
136
+
// v8 likes predictible objects
137
+
functionItem(fun,array){
138
+
this.fun=fun;
139
+
this.array=array;
140
+
}
141
+
Item.prototype.run=function(){
142
+
this.fun.apply(null,this.array);
143
+
};
144
+
process.nextTick=function(fun){
145
+
constargs=newArray(arguments.length-1);
146
+
if(arguments.length>1){
147
+
for(leti=1;i<arguments.length;i++){
148
+
// eslint-disable-next-line prefer-rest-params
149
+
args[i-1]=arguments[i];
150
+
}
151
+
}
152
+
queue.push(newItem(fun,args));
153
+
if(queue.length===1&&!draining){
154
+
runTimeout(drainQueue);
155
+
}
156
+
};
2
157
process.title='browser';
3
158
process.browser=true;
4
-
process.env={NODE_ENV: 'development'};
159
+
process.env={};
5
160
process.argv=[];
6
161
process.version='';// empty string to avoid regexp issues
7
162
process.versions={};
@@ -18,18 +173,18 @@ process.emit = noop;
18
173
process.prependListener=noop;
19
174
process.prependOnceListener=noop;
20
175
21
-
process.listeners=function(name){
176
+
process.listeners=function(){
22
177
return[];
23
178
};
24
179
25
-
process.binding=function(name){
180
+
process.binding=function(){
26
181
thrownewError('process.binding is not supported');
0 commit comments