Skip to content

Commit a5ee604

Browse files
author
Travis CI
committed
Travis CI - [ci skip] - automatic dist folder
1 parent 1e32286 commit a5ee604

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

dist/kuzzle.js

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,40 @@
22
// shim for using process in browser
33

44
var process = module.exports = {};
5+
6+
// cached from whatever global is present so that test runners that stub it
7+
// don't break things. But we need to wrap it in a try catch in case it is
8+
// wrapped in strict mode code which doesn't define any globals. It's inside a
9+
// function because try/catches deoptimize in certain engines.
10+
11+
var cachedSetTimeout;
12+
var cachedClearTimeout;
13+
14+
(function () {
15+
try {
16+
cachedSetTimeout = setTimeout;
17+
} catch (e) {
18+
cachedSetTimeout = function () {
19+
throw new Error('setTimeout is not defined');
20+
}
21+
}
22+
try {
23+
cachedClearTimeout = clearTimeout;
24+
} catch (e) {
25+
cachedClearTimeout = function () {
26+
throw new Error('clearTimeout is not defined');
27+
}
28+
}
29+
} ())
530
var queue = [];
631
var draining = false;
732
var currentQueue;
833
var queueIndex = -1;
934

1035
function cleanUpNextTick() {
36+
if (!draining || !currentQueue) {
37+
return;
38+
}
1139
draining = false;
1240
if (currentQueue.length) {
1341
queue = currentQueue.concat(queue);
@@ -23,7 +51,7 @@ function drainQueue() {
2351
if (draining) {
2452
return;
2553
}
26-
var timeout = setTimeout(cleanUpNextTick);
54+
var timeout = cachedSetTimeout(cleanUpNextTick);
2755
draining = true;
2856

2957
var len = queue.length;
@@ -40,7 +68,7 @@ function drainQueue() {
4068
}
4169
currentQueue = null;
4270
draining = false;
43-
clearTimeout(timeout);
71+
cachedClearTimeout(timeout);
4472
}
4573

4674
process.nextTick = function (fun) {
@@ -52,7 +80,7 @@ process.nextTick = function (fun) {
5280
}
5381
queue.push(new Item(fun, args));
5482
if (queue.length === 1 && !draining) {
55-
setTimeout(drainQueue, 0);
83+
cachedSetTimeout(drainQueue, 0);
5684
}
5785
};
5886

@@ -92,6 +120,7 @@ process.chdir = function (dir) {
92120
process.umask = function() { return 0; };
93121

94122
},{}],2:[function(require,module,exports){
123+
(function (Buffer){
95124
// uuid.js
96125
//
97126
// Copyright (c) 2010-2012 Robert Kieffer
@@ -365,6 +394,7 @@ process.umask = function() { return 0; };
365394
}
366395
})('undefined' !== typeof window ? window : null);
367396

397+
}).call(this,require("buffer").Buffer)
368398
},{}],3:[function(require,module,exports){
369399
(function (process){
370400
var

0 commit comments

Comments
 (0)