Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

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

Keywords

none

install

npm i evocatio

Downloadsweekly downloads

25

version

0.0.4

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability