0.1.11 • Published 7 years ago

pisco-callback-to-promise v0.1.11

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
7 years ago

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));
});