isPromise
Checks if a value is a Promise or a thenable.
Returns true for any object that has .then() and .catch() methods,
including native Promises and userland implementations.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is PromiseLike<unknown> — True if value is a Promise-like object
