webhook/node_modules/es-abstract/2018/PromiseResolve.js
Joel Male 1ada95e04a
v2.0.0 (#12)
- Convert project to Javascript/Typescript
- Allow custom headers to be passed in (optional)
- Allow body to be optional
2020-08-26 10:52:47 +10:00

15 lines
377 B
JavaScript

'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);
};