Node 8 added a promisify
function to the util core module. A couple of simple usage examples follow.
Usage with a promise
Usage with async/await
Multiple callback arguments
If the callback takes multiple arguments the promise will resolve to an object with a key/value for each argument.