invoke.js
v0.0.1
Published
invoke is a very simple service locator I use
Downloads
34
Readme
invoke.js
Simple Service locator
How to use
var invoke = require('invoke');
var testContructor1 = function(invoke, argument){
return invoke.resolveDependency("test2", argument);
};
var testContructor2 = function(invoke, argument){
return argument.returnValue
};
invoke.setDependency({
dependencyName: "test1",
buildFunction: testContructor1
});
invoke.setDependency({
dependencyName: "test2",
buildFunction: testContructor2
});
invoke.resolveDependency({
dependencyName: "test1",
dependencyArgs: {
returnValue: "something"
}
});