0.1.11 • Published 7 years ago
pisco-callback-to-promise v0.1.11
Pisco Callbacks to Promise
Library that allows to work with callbacks functions like if they were Promises.
Example:
const pctp = require('pisco-callback-to-promise');
pctp.c2p(childProcess.exec, 'pwd')
.then(stdout => {
console.log(stdout);
})
.then(() => {...})
.catch((error) => pctp.logError(error, cb));
});