evocatio

0.0.4 • Public • Published

evocatio

NPM Version Build Status

fns = require("evocatio")();
 
fns.register("whoami", => "nobody");
 
fns.register("context", function(){
    return this.id;
});
 
fns.register("namespace.async", {
    operation: function*(arg, more){
        yield asyncoperation(arg);
    }
});
 
fns.dispatch("whoami", {});  // "nobody"
fns.dispatch("context", {}, {id: "2"});  // "2"
fns.dispatch("namespace.async.operation", {arg: null, more: false});  // promise

Readme

Keywords

none

Package Sidebar

Install

npm i evocatio

Weekly Downloads

1

Version

0.0.4

License

MIT

Last publish

Collaborators

  • zf