with-resolvers.js 456 B

12345678910111213
  1. 'use strict';
  2. require('../../modules/es.promise');
  3. require('../../modules/es.promise.with-resolvers');
  4. var call = require('../../internals/function-call');
  5. var isCallable = require('../../internals/is-callable');
  6. var path = require('../../internals/path');
  7. var Promise = path.Promise;
  8. var promiseWithResolvers = Promise.withResolvers;
  9. module.exports = function withResolvers() {
  10. return call(promiseWithResolvers, isCallable(this) ? this : Promise);
  11. };