Checks if a value is a promise.
Admits only native Promise instances, so that catch() and finally() may be relied on alongside then(); foreign promise implementations and bare thenables are rejected and matched by isPromiseLike instead.
Promise
catch()
finally()
then()
The type of the promised value
The value to check
True if the value is a Promise instance; false otherwise
Checks if a value is a promise.
Admits only native
Promiseinstances, so thatcatch()andfinally()may be relied on alongsidethen(); foreign promise implementations and bare thenables are rejected and matched by isPromiseLike instead.