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
/
isIterable.ts
8 lines
(6 loc)
•
279 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
import
{ iterator
as
Symbol
_iterator }
from
'../symbol/iterator'
;
import
{ isFunction }
from
'./isFunction'
;
/** Identifies an input as being an Iterable */
export
function
isIterable
(
input
:
any
): input is
Iterable
<
any
> {
return
isFunction
(input?.[
Symbol
_iterator]); }