code: function async(makeGenerator, callback) {
    return function() {
      const generator = makeGenerator.apply(this, arguments);
      const handle = getHandle(generator, callback);
      try {
        return handle(generator.next());
      } catch(err) {
        return Promise.reject(err);
      }
    };
  }
docs: this function has originally been implemented by Forbes Lindesay you could find the original implementation in this link https://www.promisejs.org/generators/