Comparing version 0.1.0-3 to 0.1.0-4
{ | ||
"name":"skonq" | ||
,"version":"v0.1.0-3" | ||
,"version":"v0.1.0-4" | ||
,"homepage":"http://skod.it/" | ||
@@ -5,0 +5,0 @@ ,"main":"skonq" |
13
skonq.js
@@ -5,2 +5,5 @@ var nqq = []; | ||
var nq = function(fun,args){ | ||
if(!(args instanceof Array)){ | ||
args = [args]; | ||
} | ||
nqq.push({fun:fun,args:args}); | ||
@@ -10,7 +13,9 @@ nqcb(false); | ||
var nqcb = function(n){ | ||
currentcon -= n===false?0:1; | ||
if(currentconn >= maxconn){ return; } | ||
currentconn -= n===false?0:1; | ||
if(currentconn >= maxconn || nqq.length == 0){ return; } | ||
currentconn++; | ||
var f = nqq.shift(); | ||
console.log(f); | ||
if(typeof f.fun == "function"){ | ||
f(a); | ||
f.fun.apply(f,f.args); | ||
} | ||
@@ -21,2 +26,2 @@ }; | ||
module.exports.next = nqcb; | ||
module.exports.setconcurrency = function(c){currentconn = c;}; | ||
module.exports.setconcurrency = function(c){maxconn = c;}; |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1819
23
3