main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
838 bytes
|
Rev | Line | |
---|
[79a0317] | 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 |
|
---|
| 9 | var PromiseConstructorWrapper = getBuiltIn('Promise');
|
---|
| 10 | var CHECK_WRAPPER = IS_PURE && !FORCED_PROMISE_CONSTRUCTOR;
|
---|
| 11 |
|
---|
| 12 | // `Promise.resolve` method
|
---|
| 13 | // https://tc39.es/ecma262/#sec-promise.resolve
|
---|
| 14 | $({ target: 'Promise', stat: true, forced: IS_PURE || FORCED_PROMISE_CONSTRUCTOR }, {
|
---|
| 15 | resolve: function resolve(x) {
|
---|
| 16 | return promiseResolve(CHECK_WRAPPER && this === PromiseConstructorWrapper ? NativePromiseConstructor : this, x);
|
---|
| 17 | }
|
---|
| 18 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.