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

Function isKeyed

src/predicates/isKeyed.ts:18–26  ·  view source on GitHub ↗
(
  maybeKeyed: unknown
)

Source from the content-addressed store, hash-verified

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

Callers 15

constructorMethod · 0.90
groupByFactoryFunction · 0.90
partitionFactoryFunction · 0.90
__iterateUncachedMethod · 0.90
concatFactoryFunction · 0.90
sortFactoryFunction · 0.90
collectionClassFunction · 0.90
makeSequenceFunction · 0.90
defaultConverterFunction · 0.90
toJSFunction · 0.90
toArrayFunction · 0.90
toOrderedSetFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected