Comparing version 0.11.6 to 0.11.7
// shim for using process in browser | ||
var process = module.exports = {}; | ||
@@ -14,17 +13,31 @@ | ||
(function () { | ||
try { | ||
cachedSetTimeout = setTimeout; | ||
} catch (e) { | ||
cachedSetTimeout = function () { | ||
throw new Error('setTimeout is not defined'); | ||
try { | ||
cachedSetTimeout = setTimeout; | ||
} catch (e) { | ||
cachedSetTimeout = function () { | ||
throw new Error('setTimeout is not defined'); | ||
} | ||
} | ||
} | ||
try { | ||
cachedClearTimeout = clearTimeout; | ||
} catch (e) { | ||
cachedClearTimeout = function () { | ||
throw new Error('clearTimeout is not defined'); | ||
try { | ||
cachedClearTimeout = clearTimeout; | ||
} catch (e) { | ||
cachedClearTimeout = function () { | ||
throw new Error('clearTimeout is not defined'); | ||
} | ||
} | ||
} | ||
} ()) | ||
function runTimeout(fun) { | ||
if (cachedSetTimeout === setTimeout) { | ||
return setTimeout(fun, 0); | ||
} else { | ||
return cachedSetTimeout.call(null, fun, 0); | ||
} | ||
} | ||
function runClearTimeout(marker) { | ||
if (cachedClearTimeout === clearTimeout) { | ||
clearTimeout(marker); | ||
} else { | ||
cachedClearTimeout.call(null, marker); | ||
} | ||
} | ||
var queue = []; | ||
@@ -54,3 +67,3 @@ var draining = false; | ||
} | ||
var timeout = cachedSetTimeout.call(null, cleanUpNextTick); | ||
var timeout = runTimeout(cleanUpNextTick); | ||
draining = true; | ||
@@ -72,3 +85,3 @@ | ||
draining = false; | ||
cachedClearTimeout.call(null, timeout); | ||
runClearTimeout(timeout); | ||
} | ||
@@ -85,3 +98,3 @@ | ||
if (queue.length === 1 && !draining) { | ||
cachedSetTimeout.call(null, drainQueue, 0); | ||
runTimeout(drainQueue); | ||
} | ||
@@ -88,0 +101,0 @@ }; |
@@ -11,3 +11,3 @@ { | ||
}, | ||
"version": "0.11.6", | ||
"version": "0.11.7", | ||
"repository": { | ||
@@ -14,0 +14,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10482
252