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

queue-async

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

queue-async - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

component.json

6

package.json
{
"name": "queue-async",
"version": "1.0.0",
"version": "1.0.1",
"description": "A little helper for asynchronous JavaScript.",

@@ -20,4 +20,4 @@ "keywords": [

"devDependencies": {
"uglify-js": "1.2.3",
"vows": "0.6.x"
"uglify-js": "2.2.3",
"vows": "0.7.0"
},

@@ -24,0 +24,0 @@ "scripts": {

@@ -5,3 +5,3 @@ (function() {

queue.version = "1.0.0";
queue.version = "1.0.1";

@@ -8,0 +8,0 @@ function queue(parallelism) {

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

(function(){function a(a){function l(){if(f&&d<a){var b=f,c=b[0],j=Array.prototype.slice.call(b,1),k=b.index;f===g?f=g=null:f=f.next,++d,j.push(function(a,b){--d;if(h!=null)return;a!=null?(h=a,e=i=f=g=null,m()):(i[k]=b,--e?l():m())}),c.apply(null,j)}}function m(){h!=null?j(h):k?j(null,i):j.apply(null,[null].concat(i))}var c={},d=0,e=0,f,g,h=null,i=[],j=b,k;return arguments.length<1&&(a=Infinity),c.defer=function(){if(!h){var a=arguments;a.index=i.push(undefined)-1,g?(g.next=a,g=g.next):f=g=a,++e,l()}return c},c.await=function(a){return j=a,k=!1,e||m(),c},c.awaitAll=function(a){return j=a,k=!0,e||m(),c},c}function b(){}typeof module=="undefined"?self.queue=a:module.exports=a,a.version="1.0.0"})();
(function(){if(typeof module==="undefined")self.queue=queue;else module.exports=queue;queue.version="1.0.1";function queue(parallelism){var queue={},active=0,remaining=0,head,tail,error=null,results=[],await=noop,awaitAll;if(arguments.length<1)parallelism=Infinity;queue.defer=function(){if(!error){var node=arguments;node.index=results.push(undefined)-1;if(tail)tail.next=node,tail=tail.next;else head=tail=node;++remaining;pop()}return queue};queue.await=function(f){await=f;awaitAll=false;if(!remaining)notify();return queue};queue.awaitAll=function(f){await=f;awaitAll=true;if(!remaining)notify();return queue};function pop(){if(head&&active<parallelism){var node=head,f=node[0],a=Array.prototype.slice.call(node,1),i=node.index;if(head===tail)head=tail=null;else head=head.next;++active;a.push(function(e,r){--active;if(error!=null)return;if(e!=null){error=e;remaining=results=head=tail=null;notify()}else{results[i]=r;if(--remaining)pop();else notify()}});f.apply(null,a)}}function notify(){if(error!=null)await(error);else if(awaitAll)await(null,results);else await.apply(null,[null].concat(results))}return queue}function noop(){}})();

Sorry, the diff of this file is not supported yet

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