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

Function isStack

src/predicates/isStack.ts:8–14  ·  view source on GitHub ↗
(maybeStack: unknown)

Source from the content-addressed store, hash-verified

6 * True if `maybeStack` is a Stack.
7 */
8export function isStack(maybeStack: unknown): maybeStack is Stack<unknown> {
9 return Boolean(
10 maybeStack &&
11 // @ts-expect-error: maybeStack is typed as `{}`, need to change in 6.0 to `maybeStack && typeof maybeStack === 'object' && MAYBE_STACK_SYMBOL in maybeStack`
12 maybeStack[IS_STACK_SYMBOL]
13 );
14}

Callers 2

constructorMethod · 0.90
pushAllMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected