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

Function isValueObject

src/predicates/isValueObject.ts:10–18  ·  view source on GitHub ↗
(maybeValue: unknown)

Source from the content-addressed store, hash-verified

8 * `Immutable.is()` and can be used as keys in a `Map` or members in a `Set`.
9 */
10export function isValueObject(maybeValue: unknown): maybeValue is ValueObject {
11 return Boolean(
12 maybeValue &&
13 // @ts-expect-error: maybeValue is typed as `{}`
14 typeof maybeValue.equals === 'function' &&
15 // @ts-expect-error: maybeValue is typed as `{}`
16 typeof maybeValue.hashCode === 'function'
17 );
18}

Callers 2

isFunction · 0.90
Predicates.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected