yanchengPowerSupply/node_modules/p-try
mazhehui 33e57c6f11 分布式光伏大屏页面 2023-07-18 08:47:30 +08:00
..
index.js 分布式光伏大屏页面 2023-07-18 08:47:30 +08:00
license 分布式光伏大屏页面 2023-07-18 08:47:30 +08:00
package.json 分布式光伏大屏页面 2023-07-18 08:47:30 +08:00
readme.md 分布式光伏大屏页面 2023-07-18 08:47:30 +08:00

readme.md

p-try Build Status

Promise#try() ponyfill - Starts a promise chain

How is it useful?

Install

$ npm install --save p-try

Usage

const pTry = require('p-try');

pTry(() => {
	return synchronousFunctionThatMightThrow();
}).then(value => {
	console.log(value);
}).catch(error => {
	console.error(error);
});
  • p-finally - Promise#finally() ponyfill - Invoked when the promise is settled regardless of outcome
  • More…

License

MIT © Sindre Sorhus