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.reject.js 583B

123456789101112131415
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var newPromiseCapabilityModule = require('../internals/new-promise-capability');
  4. var FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;
  5. // `Promise.reject` method
  6. // https://tc39.es/ecma262/#sec-promise.reject
  7. $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
  8. reject: function reject(r) {
  9. var capability = newPromiseCapabilityModule.f(this);
  10. var capabilityReject = capability.reject;
  11. capabilityReject(r);
  12. return capability.promise;
  13. }
  14. });