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
zweifisch/evocatio
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published