UNPKG

return-style

Version:

Non-intrusively convert the result of any function or promise to the user's desired style.

9 lines (8 loc) 167 B
export async function isSuccessPromise(promise: PromiseLike<unknown>): Promise<boolean> { try { await promise return true } catch { return false } }