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

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

The 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