main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
506 bytes
|
Line | |
---|
1 | 'use strict';
|
---|
2 |
|
---|
3 | var GetIntrinsic = require('get-intrinsic');
|
---|
4 | var callBind = require('call-bind');
|
---|
5 | var $SyntaxError = require('es-errors/syntax');
|
---|
6 |
|
---|
7 | var $resolve = GetIntrinsic('%Promise.resolve%', true);
|
---|
8 | var $PromiseResolve = $resolve && callBind($resolve);
|
---|
9 |
|
---|
10 | // https://262.ecma-international.org/9.0/#sec-promise-resolve
|
---|
11 |
|
---|
12 | module.exports = function PromiseResolve(C, x) {
|
---|
13 | if (!$PromiseResolve) {
|
---|
14 | throw new $SyntaxError('This environment does not support Promises.');
|
---|
15 | }
|
---|
16 | return $PromiseResolve(C, x);
|
---|
17 | };
|
---|
18 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.