Comparing version 0.1.0-0 to 0.1.1
17
index.js
@@ -46,2 +46,19 @@ var debug = require('debug')('workflow:common') | ||
createAdapter: function(object) { | ||
return function getType(name) { | ||
var method = object[name]; | ||
return function define(step) { | ||
return function build(context) { | ||
return function execute(done) { | ||
var args = (context.get(step.arguments) || []) | ||
.map(function(arg) { | ||
return context.get(arg); | ||
}) | ||
var result = method.apply(object, args) | ||
done(undefined, result); | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
configure: function(options) { | ||
@@ -48,0 +65,0 @@ _.extend(settings, options); |
{ | ||
"name": "worksmith", | ||
"version": "0.1.0-0", | ||
"version": "0.1.1", | ||
"description": "A purely functional workflow engine ", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
75854
54
1679