Comparing version 1.0.4 to 1.0.5
@@ -76,3 +76,3 @@ /** | ||
*/ | ||
next: function (index, context, err, data) { | ||
next: function (thisArg, index, context, err, data) { | ||
if (err) { | ||
@@ -103,5 +103,5 @@ this.runErrorHandlers(err); | ||
var curr = flow[index.flowIndex++]; | ||
var nextFn = this.next.bind(this, index, context); | ||
var nextToFn = this.nextTo.bind(this, index, context); | ||
curr(context, nextFn, nextToFn, data); | ||
var nextFn = this.next.bind(this, thisArg, index, context); | ||
var nextToFn = this.nextTo.bind(this, thisArg, index, context); | ||
curr.call(thisArg, context, nextFn, nextToFn, data); | ||
@@ -123,3 +123,3 @@ return this; | ||
*/ | ||
nextTo: function (index, context, step, data) { | ||
nextTo: function (thisArg, index, context, step, data) { | ||
var steps = this.steps; | ||
@@ -136,3 +136,3 @@ var stepIndex = steps.indexOf(step); | ||
this.next({stepIndex: stepIndex, flowIndex: 0}, context, null, data); | ||
this.next(thisArg, {stepIndex: stepIndex, flowIndex: 0}, context, null, data); | ||
@@ -179,3 +179,3 @@ return this; | ||
*/ | ||
run: function (context, stepName) { | ||
run: function (context, stepName, thisArg) { | ||
var steps = this.steps; | ||
@@ -191,3 +191,3 @@ var stepIndex = stepName ? steps.indexOf(stepName) : 0; | ||
this.next(index, context || {}, null); | ||
this.next(thisArg, index, context || {}, null); | ||
@@ -194,0 +194,0 @@ return this; |
{ | ||
"name": "step-flow", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "step flow", | ||
@@ -5,0 +5,0 @@ "main": "lib/flow.js", |
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
35157
19
569