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

node_modules.core-js.modules.es7.promise.try.js Maven / Gradle / Ivy

There is a newer version: 1.1.2
Show newest version
'use strict';
// https://github.com/tc39/proposal-promise-try
var $export = require('./_export');
var newPromiseCapability = require('./_new-promise-capability');
var perform = require('./_perform');

$export($export.S, 'Promise', { 'try': function (callbackfn) {
  var promiseCapability = newPromiseCapability.f(this);
  var result = perform(callbackfn);
  (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v);
  return promiseCapability.promise;
} });




© 2015 - 2024 Weber Informatics LLC | Privacy Policy