chuwanghui 6d115466a5 electron库 | 6 lat temu | |
---|---|---|
.. | ||
index.js | 6 lat temu | |
license | 6 lat temu | |
package.json | 6 lat temu | |
readme.md | 6 lat temu |
Promise#try()
ponyfill - Starts a promise chain
$ npm install --save p-try
const pTry = require('p-try');
pTry(() => {
return synchronousFunctionThatMightThrow();
}).then(value => {
console.log(value);
}).catch(error => {
console.error(error);
});
Promise#finally()
ponyfill - Invoked when the promise is settled regardless of outcomeMIT © Sindre Sorhus