REDROOM
PHP 8.2.30
Path:
Logout
Edit File
Size: 894 B
Close
/opt/alt/alt-nodejs8/root/lib/node_modules/npm/node_modules/p-try/readme.md
Text
Base64
# p-try [](https://travis-ci.org/sindresorhus/p-try) > [`Promise#try()`](https://github.com/ljharb/proposal-promise-try) [ponyfill](https://ponyfill.com) - Starts a promise chain [How is it useful?](http://cryto.net/~joepie91/blog/2016/05/11/what-is-promise-try-and-why-does-it-matter/) ## Install ``` $ npm install --save p-try ``` ## Usage ```js const pTry = require('p-try'); pTry(() => { return synchronousFunctionThatMightThrow(); }).then(value => { console.log(value); }).catch(error => { console.error(error); }); ``` ## Related - [p-finally](https://github.com/sindresorhus/p-finally) - `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome - [More…](https://github.com/sindresorhus/promise-fun) ## License MIT © [Sindre Sorhus](https://sindresorhus.com)
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 4
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
index.js
82 B
lrw-r--r--
2021-09-28 10:29:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
license
1.09 KB
lrw-r--r--
2021-09-28 10:29:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
package.json
1.56 KB
lrw-r--r--
2021-09-28 10:29:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
readme.md
894 B
lrw-r--r--
2021-09-28 10:29:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).