seneca-promisified

Metapackage containing all of the seneca-promisified wrappers.

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
seneca-promisified
0.6.134 years ago6 years agoMinified + gzip package size for seneca-promisified in KB

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
});

API Documentation

See: