Comparing version 0.0.3 to 0.0.4
@@ -6,3 +6,2 @@ var async = require("async"); | ||
return function(obj, targetState, callback) { | ||
console.log("HERE"); | ||
if(!workflow.hasOwnProperty(targetState)) { | ||
@@ -15,3 +14,2 @@ // There is no such state defined | ||
if(err) return callback(err); | ||
console.log("STATE", currentState); | ||
var current = workflow[currentState]; | ||
@@ -39,9 +37,6 @@ if(!current.hasOwnProperty(targetState)) { | ||
if(err) return callback(err); | ||
console.log("HM"); | ||
//Run any trigger functions now state is set | ||
async.each(transition.triggers||[], function(t, cb){ | ||
console.log('trnasa', obj, t); | ||
return t(obj, cb); | ||
}, function(err) { | ||
console.log("AND HERE"); | ||
return callback(err, obj); | ||
@@ -48,0 +43,0 @@ }); |
{ | ||
"name": "reflow", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Simple to use workflow/transitions helper.", | ||
@@ -5,0 +5,0 @@ "keywords" : ["workflow", "workflows"], |
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
8641
129