UNPKG
pipio
Version:
latest (0.1.7)
0.1.7
0.1.6
0.1.5
0.1.4
0.1.0
0.0.0-beta
Chain functions together and handle a complex workflow
github.com/ham3dz/pipio
ham3dz/pipio
pipio
/
dist
/
import
/
utils.js
9 lines
(8 loc)
•
269 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
/** * Determine whether the given `promise` is a Promise. * *
@param
{
*
}
promise
* *
@returns
{
Boolean
} */
export
const
isPromise
= (
promise
) => promise
instanceof
Promise
||
typeof
(promise ===
null
|| promise ===
void
0
?
void
0
: promise.
then
) ===
'function'
;