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.resolve.js 838B

123456789101112131415161718
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var getBuiltIn = require('../internals/get-built-in');
  4. var IS_PURE = require('../internals/is-pure');
  5. var NativePromiseConstructor = require('../internals/promise-native-constructor');
  6. var FORCED_PROMISE_CONSTRUCTOR = require('../internals/promise-constructor-detection').CONSTRUCTOR;
  7. var promiseResolve = require('../internals/promise-resolve');
  8. var PromiseConstructorWrapper = getBuiltIn('Promise');
  9. var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
  10. // `Promise.resolve` method
  11. // https://tc39.es/ecma262/#sec-promise.resolve
  12. $({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
  13. resolve: function resolve(x) {
  14. return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);
  15. }
  16. });