code: function promisify(func) {
    return function(...args) {
      return new Promise((resolve, reject) => {
        args.push(wrap(resolve, reject));
        func.call(this, ...args);
      });
    };
  }
docs: Wrap a function that accepts node.js
  style callbacks into a function that
  returns a promise.
  @param {Function} func
  @returns {AsyncFunction}