simple-thenify

1.0.2 • Public • Published

Build Status

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

Readme

Keywords

Package Sidebar

Install

npm i simple-thenify

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • kael