runas-callback-to-promise
Runas library to work with callback functions making a promise API
Last updated 3 years ago by sbonacho .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install runas-callback-to-promise 
SYNC missed versions from official npm registry.

Runas Callbacks to Promise

Library that allows to work with callbacks functions like if they were Promises.

Example:

const pctp = require('runas-callback-to-promise');

pctp.c2p(childProcess.exec, 'pwd')
  .then(stdout => {
    console.log(stdout);
  })
  .then(() => {...})
  .catch((error) => pctp.logError(error, cb));
});

Current Tags

  • 0.1.1                                ...           latest (3 years ago)

1 Versions

  • 0.1.1                                ...           3 years ago
Downloads
Today 0
This Week 1
This Month 2
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2014 - 2017 © taobao.org |