UNPKG
@ricepuddin/redux-segment
Version:
latest (1.4.1)
1.4.1
Segment.io analytics integration for redux.
github.com/rangle/redux-segment
rangle/redux-segment
@ricepuddin/redux-segment
/
examples
/
react-redux
/
src
/
utils
/
isPromise.js
12 lines
(11 loc)
•
298 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
/** * Returns whether the provided value is a promise * *
@param
{
object
} value Potential promise *
@return
{
Boolean
} */
export
default
function
isPromise
(
value
) {
if
(value !==
null
&&
typeof
value ===
'object'
) {
return
value.
promise
&&
typeof
value.
promise
.
then
===
'function'
; } }