runas-callback-to-promise
v0.1.1
Published
Runas library to work with callback functions making a promise API
Downloads
7
Readme
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));
});