package
Promise-callback helper fuctions
npm install @cspotcode/promise-cbGitHub-flavored package documentation.
Across all versions, last 30 days.
34 in 30 days
Runtime metadata.
A fork of promise-cb that fixes broken installation on Windows. See the relevant issue.
Promise-callback helper functions.
Creates a Promise from a callback-style function.
Example:
fromCallback(cb => fs.readFile(file, cb));Calls a callback function with the result of a promise once it settles.
Example:
toCallback(promise, (err, result) => {
if (err) console.error(err.stack);
else doSomething(result);
});