0.1.0 • Published 7 years ago

smthen v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

smThen

Wrap hapi.js server methods with a Promise. Requires Node.js 5+. ( Uses spread operator )

Installation

npm install smthen --save

Usage

import smThen from 'smthen';

smThen(server.methods.myServerMethod, 'arg1', 'arg2' [, any number of arguments])
.then(result => {
    //do something with result
})
.catch(err => {
    console.log(err.toString());
})