Added a node.js-specific function: promisify.