Son CV dans un terminal web en Javascript!
https://terminal-cv.gregandev.fr
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
564 B
16 lines
564 B
1 year ago
|
'use strict';
|
||
|
var $ = require('../internals/export');
|
||
|
var newPromiseCapabilityModule = require('../internals/new-promise-capability');
|
||
|
var perform = require('../internals/perform');
|
||
|
|
||
|
// `Promise.try` method
|
||
|
// https://github.com/tc39/proposal-promise-try
|
||
|
$({ target: 'Promise', stat: true }, {
|
||
|
'try': function (callbackfn) {
|
||
|
var promiseCapability = newPromiseCapabilityModule.f(this);
|
||
|
var result = perform(callbackfn);
|
||
|
(result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);
|
||
|
return promiseCapability.promise;
|
||
|
}
|
||
|
});
|