simple-thenify
v1.0.2
Published
Make sure a function is thenable.
Downloads
13
Readme
simple-thenify
Make sure that a function will return a promise (thenable).
If a function does not return a promise, it will promise.resolve
the return value.
Install
$ npm install simple-thenify --save
Usage
const thenify = require('simple-thenify')
const fn = thenify(x => x + 1)
fn(1).then(console.log) // 2
License
MIT