MCPcopy
hub / github.com/immutable-js/immutable-js / isCollection

Function isCollection

src/predicates/isCollection.ts:19–27  ·  view source on GitHub ↗
(
  maybeCollection: unknown
)

Source from the content-addressed store, hash-verified

17 * ```
18 */
19export function isCollection(
20 maybeCollection: unknown
21): maybeCollection is Collection<unknown, unknown> {
22 return Boolean(
23 maybeCollection &&
24 // @ts-expect-error: maybeCollection is typed as `{}`, need to change in 6.0 to `maybeCollection && typeof maybeCollection === 'object' && IS_COLLECTION_SYMBOL in maybeCollection`
25 maybeCollection[IS_COLLECTION_SYMBOL]
26 );
27}

Callers 15

constructorMethod · 0.90
constructorMethod · 0.90
__iterateMethod · 0.90
__iteratorMethod · 0.90
concatFactoryFunction · 0.90
flatDeepFunction · 0.90
flattenFactoryFunction · 0.90
toJSFunction · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
constructorMethod · 0.90
deepEqualFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected