seneca-promisified
v0.6.13
Published
Metapackage containing all of the seneca-promisified wrappers.
Downloads
3,343
Maintainers
Readme
Metapackage containing all of the seneca-promisified wrappers.
Example
const cbSeneca = require('seneca')();
cbSeneca.use('entity');
const SenecaPromisified = require('seneca-promisified');
const seneca = new SenecaPromisified(cbSeneca);
seneca.add({
role: 'entity',
name: 'greet',
cmd: 'save'
}, (args) => {
return {
gretting: 'hello ' + args.ent.name
};
});
seneca.make('greet').save$({ name: 'AGhost-7' }).then((res) => {
console.log(res.greeting); // => hello AGhost-7
});