try.js 348 B

1234567891011
  1. 'use strict';
  2. require('../../modules/es.promise');
  3. require('../../modules/esnext.promise.try');
  4. var path = require('../../internals/path');
  5. var Promise = path.Promise;
  6. var promiseTry = Promise['try'];
  7. module.exports = { 'try': function (callbackfn) {
  8. return promiseTry.call(typeof this === 'function' ? this : Promise, callbackfn);
  9. } }['try'];