All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.2018.PromiseResolve.js Maven / Gradle / Ivy

There is a newer version: 1.22.3
Show newest version
'use strict';

var GetIntrinsic = require('get-intrinsic');
var callBind = require('call-bind');

var $resolve = GetIntrinsic('%Promise.resolve%', true);
var $PromiseResolve = $resolve && callBind($resolve);

// https://262.ecma-international.org/9.0/#sec-promise-resolve

module.exports = function PromiseResolve(C, x) {
	if (!$PromiseResolve) {
		throw new SyntaxError('This environment does not support Promises.');
	}
	return $PromiseResolve(C, x);
};





© 2015 - 2025 Weber Informatics LLC | Privacy Policy