source: imaps-frontend/node_modules/es-abstract/2020/PromiseResolve.js@ d565449

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
RevLine 
[d565449]1'use strict';
2
3var GetIntrinsic = require('get-intrinsic');
4var callBind = require('call-bind');
5var $SyntaxError = require('es-errors/syntax');
6
7var $resolve = GetIntrinsic('%Promise.resolve%', true);
8var $PromiseResolve = $resolve && callBind($resolve);
9
10// https://262.ecma-international.org/9.0/#sec-promise-resolve
11
12module.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.