Let's say you have a library that returns callbacks, for example the fs module in NodeJS:
const fs = require("fs");
fs.readFile("/foo.txt", (err, data) => {
if(err) throw err;
console.log(data);
});
We want to convert it to a promise returning API, with bluebird - ...