Node-Red configuration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

es.promise.with-resolvers.js 527B

12345678910111213141516
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var newPromiseCapabilityModule = require('../internals/new-promise-capability');
  4. // `Promise.withResolvers` method
  5. // https://github.com/tc39/proposal-promise-with-resolvers
  6. $({ target: 'Promise', stat: true }, {
  7. withResolvers: function withResolvers() {
  8. var promiseCapability = newPromiseCapabilityModule.f(this);
  9. return {
  10. promise: promiseCapability.promise,
  11. resolve: promiseCapability.resolve,
  12. reject: promiseCapability.reject
  13. };
  14. }
  15. });