isPromise
Callable
Parameters
object: unknown
to check if it is a
Promise
Returns boolean
trueif it is anobjector afunctionthat has athenfunction. And returnsfalseotherwise.
to check if it is a Promise
true if it is an object or a function that has a then function. And returns false otherwise.
An alternative to the node function
isPromisethat exists inutil/typesbecause it is not available on the browser.