Socket
Socket
Sign inDemoInstall

process

Package Overview
Dependencies
0
Maintainers
3
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.11.3 to 0.11.4

11

browser.js
// shim for using process in browser
var process = module.exports = {};
// cached from whatever global is present so that test runners that stub it don't break things.
var cachedSetTimeout = setTimeout;
var cachedClearTimeout = clearTimeout;
var queue = [];

@@ -28,3 +33,3 @@ var draining = false;

}
var timeout = setTimeout(cleanUpNextTick);
var timeout = cachedSetTimeout(cleanUpNextTick);
draining = true;

@@ -46,3 +51,3 @@

draining = false;
clearTimeout(timeout);
cachedClearTimeout(timeout);
}

@@ -59,3 +64,3 @@

if (queue.length === 1 && !draining) {
setTimeout(drainQueue, 0);
cachedSetTimeout(drainQueue, 0);
}

@@ -62,0 +67,0 @@ };

@@ -11,3 +11,3 @@ {

},
"version": "0.11.3",
"version": "0.11.4",
"repository": {

@@ -14,0 +14,0 @@ "type": "git",

@@ -66,2 +66,29 @@ var assert = require('assert');

});
describe('rename globals', function (t) {
it('throws an error', function (done){
var oldTimeout = setTimeout;
var oldClear = clearTimeout;
function cleanUp() {
setTimeout = oldTimeout;
clearTimeout = oldClear;
}
setTimeout = function () {
cleanUp();
assert.ok(false);
done();
}
clearTimeout = function () {
cleanUp();
assert.ok(false);
done();
}
ourProcess.nextTick(function () {
cleanUp();
assert.ok(true);
done();
});
});
});
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc