in-parallel
Advanced tools
Comparing version 0.8.0 to 0.9.0
@@ -24,3 +24,3 @@ function isFunction(functionToCheck) { | ||
for each parallel action to call when it finishes with an element*/ | ||
var proceedAfterInParallelAction = function() { | ||
collection.proceedAfterInParallelAction = function() { | ||
numElementsCompleted++; | ||
@@ -30,2 +30,3 @@ | ||
if(numElementsCompleted == numElements) { | ||
delete collection.proceedAfterInParallelAction; | ||
//run the onFinish function | ||
@@ -32,0 +33,0 @@ onFinish(); |
{ | ||
"name": "in-parallel", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"description": "A small library for Runs a function on the elements of the provided collection in parallel ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,3 +19,3 @@ # in-parallel | ||
element++; | ||
this.proceedAfterParallelAction(); | ||
collection.proceedAfterInParallelAction(); | ||
}, function(){ | ||
@@ -37,3 +37,3 @@ collection.push(5); | ||
//call the provided proceed method after this user is done | ||
this.proceedAfterInParallelAction(); | ||
collection.proceedAfterInParallelAction(); | ||
} else { | ||
@@ -44,3 +44,3 @@ //find succeeded | ||
//call the provided proceed method after this user is done | ||
this.proceedAfterInParallelAction(); | ||
collection.proceedAfterInParallelAction(); | ||
} | ||
@@ -47,0 +47,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5518
55