Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var promiseTry = function try_(callbackfn) {
/* eslint no-invalid-this: 0 */
var C = this;
if (ES.Type(C) !== 'Object') {
throw new TypeError('receiver must be an object');
}
if (!ES.IsConstructor(C)) {
throw new TypeError('receiver must be a constructor');
}
return new C(function (resolve) {
resolve(callbackfn());
});
};
if (Object.getOwnPropertyDescriptor && Object.getOwnPropertyDescriptor(promiseTry, 'name').configurable) {