cbp
Yet another callback to promise converter.
INSTALLATION
Everyone know how to do this:
npm install cbp --save
USAGE
cbp
can argument as a function, an object, or a string.
If given function, cbp
will tranform the function to a function that return
a promise:
const fs = ;const cbp = ; const readFile = ; ;
If given an object, cbp
will do like what it does to a function on every
member if that member is a function. And, you still have access to the original
function with prefix __
:
const fs = ;const cbp = ; const fsp = ;fsp ; // accessing original function with prefix __fsp;
And if given a string, cbp
will do like what it does to an object by doing
require
first.
const cbp = ;const fs = ; fs ;
LICENSE
MIT