Invokes the candidate function and returns undefined if an rejected promise is returned from it.
The candidate function to run.
A promise that resolves with the result from candidate. Returns undefined if candidate returns a rejected promise.
Invokes the candidate function and returns undefined if an rejected promise is returned from it.
A promise that resolves with the result from candidate. Returns fallback if candidate returns a rejected promise.
Invokes the candidate function and returns undefined if an rejected promise is returned from it.
Param: candidate
The candidate function to run.
Param: fallback
The optional fallback value to return if the candidate throws an Error.
Returns
A promise that resolves with the result from candidate or fallback if candidate returns a rejected promise. Resolves with undefined if no fallback is provided.