Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

immediate

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

immediate - npm Package Compare versions

Comparing version 2.3.1 to 2.4.0

lib/index.js~

5

component.json

@@ -5,3 +5,3 @@ {

"description": "A shim for the setImmediate efficient script yielding API",
"version": "2.3.1",
"version": "2.4.0",
"keywords": [],

@@ -19,4 +19,5 @@ "development": {},

"lib/timeout.js",
"lib/global.js"
"lib/global.js",
"lib/mutation.js"
]
}

48

dist/immediate.js

@@ -206,4 +206,5 @@ ;(function(){

var types = [
require("./realSetImmediate"),
//require("./realSetImmediate"),
require("./nextTick"),
require("./mutation"),
require("./postMessage"),

@@ -218,9 +219,9 @@ require("./messageChannel"),

var i = 0,
task;
/*jslint boss: true */
while (task = handlerQueue[i++]) {
task();
}
handlerQueue = [];
task,
innerQueue = handlerQueue;
handlerQueue = [];
/*jslint boss: true */
while (task = innerQueue[i++]) {
task();
}
}

@@ -254,2 +255,3 @@ var nextTick;

module.exports = retFunc;
});

@@ -260,3 +262,3 @@ require.register("immediate/lib/realSetImmediate.js", function(exports, require, module){

exports.test = function () {
return globe.setImmediate;
return globe.setImmediate;
};

@@ -267,2 +269,3 @@

};
});

@@ -375,2 +378,29 @@ require.register("immediate/lib/nextTick.js", function(exports, require, module){

});
require.register("immediate/lib/mutation.js", function(exports, require, module){
"use strict";
//based off rsvp
//https://github.com/tildeio/rsvp.js/blob/master/lib/rsvp/async.js
var globe = require("./global");
var MutationObserver = globe.MutationObserver || globe.WebKitMutationObserver;
exports.test = function () {
return MutationObserver;
};
exports.install = function (handle) {
var observer = new MutationObserver(handle);
var element = globe.document.createElement("div");
observer.observe(element, { attributes: true });
// Chrome Memory Leak: https://bugs.webkit.org/show_bug.cgi?id=93661
globe.addEventListener("unload", function () {
observer.disconnect();
observer = null;
}, false);
return function () {
element.setAttribute("drainQueue", "drainQueue");
};
};
});
require.alias("immediate/lib/index.js", "immediate/index.js");if (typeof exports == "object") {

@@ -377,0 +407,0 @@ module.exports = require("immediate");

"use strict";
var types = [
require("./realSetImmediate"),
//require("./realSetImmediate"),
require("./nextTick"),
require("./mutation"),
require("./postMessage"),

@@ -14,9 +15,9 @@ require("./messageChannel"),

var i = 0,
task;
/*jslint boss: true */
while (task = handlerQueue[i++]) {
task();
}
handlerQueue = [];
task,
innerQueue = handlerQueue;
handlerQueue = [];
/*jslint boss: true */
while (task = innerQueue[i++]) {
task();
}
}

@@ -49,2 +50,2 @@ var nextTick;

};
module.exports = retFunc;
module.exports = retFunc;
"use strict";
var globe = require("./global");
exports.test = function () {
return globe.setImmediate;
return globe.setImmediate;
};

@@ -9,2 +9,2 @@

return globe.setImmediate.bind(globe);
};
};

@@ -1,2 +0,2 @@

Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, and Domenic Denicola
Copyright (c) 2012 Barnesandnoble.com, llc, Donavon West, Domenic Denicola, Brian Cavalier

@@ -3,0 +3,0 @@ Permission is hereby granted, free of charge, to any person obtaining

{
"name": "immediate",
"description": "A shim for the setImmediate efficient script yielding API",
"version": "2.3.1",
"author": "NobleJS",
"version": "2.4.0",
"contributors": [

@@ -7,0 +6,0 @@ "Domenic Denicola <domenic@domenicdenicola.com> (http://domenicdenicola.com)",

@@ -8,3 +8,3 @@ <a href="https://ci.testling.com/calvinmetcalf/setImmediate">

**immediate.js** is a cross between [NobleJS's setImmediate](https://github.com/NobleJS/setImmediate) and [Cujo's When](https://github.com/cujojs/when).
**immediate.js** is a cross between [NobleJS's setImmediate](https://github.com/NobleJS/setImmediate), [Cujo's When](https://github.com/cujojs/when), and [RSVP][RSVP].

@@ -24,2 +24,6 @@ immediate takes the tricks from setImmedate and combines them with the schedualer from when to make a

### `MutationObserver`
This is what [RSVP][RSVP] uses, it's very fast, details on [MDN](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver)
### `postMessage`

@@ -77,3 +81,3 @@

[RSVP]: https://github.com/tildeio/rsvp.js
[spec]: https://dvcs.w3.org/hg/webperf/raw-file/tip/specs/setImmediate/Overview.html

@@ -80,0 +84,0 @@ [list-post]: http://lists.w3.org/Archives/Public/public-web-perf/2011Jun/0100.html

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc