isPromise
Callable
Parameters
object: unknown
to check if it is a
Promise
Returns boolean
true
if it is anobject
or afunction
that has athen
function. And returnsfalse
otherwise.
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
isPromise
that exists inutil/types
because it is not available on the browser.