UNPKG
p-try
Version:
latest (3.0.0)
3.0.0
2.2.0
2.1.0
2.0.0
1.0.0
`Start a promise chain
github.com/sindresorhus/p-try
sindresorhus/p-try
p-try
/
index.js
6 lines
(5 loc)
•
140 B
JavaScript
View Raw
1
2
3
4
5
6
export
default
async
function
pTry
(
function_, ...arguments_
) {
return
new
Promise
(
resolve
=>
{
resolve
(
function_
(...arguments_)); }); }