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 3.2.2 to 3.2.3

bench.js

27

lib/index.js

@@ -15,4 +15,7 @@ 'use strict';

function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue && currentQueue.length) {
if (currentQueue.length) {
queue = currentQueue.concat(queue);

@@ -29,2 +32,5 @@ } else {

function nextTick() {
if (draining) {
return;
}
scheduled = false;

@@ -37,3 +43,3 @@ draining = true;

queue = [];
while (++queueIndex < len) {
while (currentQueue && ++queueIndex < len) {
currentQueue[queueIndex].run();

@@ -44,2 +50,3 @@ }

}
currentQueue = null;
queueIndex = -1;

@@ -64,3 +71,17 @@ draining = false;

Item.prototype.run = function () {
this.fun.apply(null, this.array);
var fun = this.fun;
var array = this.array;
switch (array.length) {
case 0:
return fun();
case 1:
return fun(array[0]);
case 2:
return fun(array[0], array[1]);
case 3:
return fun(array[0], array[1], array[2]);
default:
return fun.apply(null, array);
}
};

@@ -67,0 +88,0 @@ module.exports = immediate;

2

package.json
{
"name": "immediate",
"version": "3.2.2",
"version": "3.2.3",
"description": "A cross browser microtask library",

@@ -5,0 +5,0 @@ "contributors": [

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