UNPKG
cli-legend
Version:
latest (1.0.0)
1.0.0
"A fun command-line rogurelike dungeon game"
github.com/SamparkBhol/roguemaze
SamparkBhol/roguemaze
cli-legend
/
RogueMaze
/
node_modules
/
rxjs
/
src
/
internal
/
util
/
isPromise.ts
10 lines
(8 loc)
•
245 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ isFunction }
from
"./isFunction"
;
/** * Tests to see if the object is "thennable". *
@param
value the object to test */
export
function
isPromise
(
value
:
any
): value is
PromiseLike
<
any
> {
return
isFunction
(value?.
then
); }