Welcome to mirror list, hosted at ThFree Co, Russian Federation.

PromiseResolve.js « 2019 « es-abstract « node_modules - github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f70745df7f5164d77dbc333b354558293322a902 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
'use strict';

var callBound = require('../helpers/callBound');

var $PromiseResolve = callBound('Promise.resolve', true);

// https://ecma-international.org/ecma-262/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);
};