MCPcopy Index your code
hub / github.com/immutable-js/immutable-js / hasIterator

Function hasIterator

src/Iterator.ts:98–107  ·  view source on GitHub ↗
(
  maybeIterable: unknown
)

Source from the content-addressed store, hash-verified

96}
97
98export function hasIterator(
99 maybeIterable: unknown
100): maybeIterable is Iterable<unknown> {
101 if (Array.isArray(maybeIterable)) {
102 // IE11 trick as it does not support `Symbol.iterator`
103 return true;
104 }
105
106 return !!getIteratorFn(maybeIterable);
107}
108
109export function isIterator(
110 maybeIterator: unknown

Callers 3

concatMethod · 0.90
fromJSWithFunction · 0.90
maybeIndexedSeqFromValueFunction · 0.90

Calls 1

getIteratorFnFunction · 0.85

Tested by

no test coverage detected