MCPcopy
hub / github.com/openai/chatkit-js / isPlainObjectOrArray

Function isPlainObjectOrArray

packages/chatkit-react/src/useStableOptions.ts:3–12  ·  view source on GitHub ↗
(
  obj: unknown,
)

Source from the content-addressed store, hash-verified

1import React from 'react';
2
3function isPlainObjectOrArray(
4 obj: unknown,
5): obj is Record<string, unknown> | unknown[] {
6 return (
7 (obj !== null &&
8 typeof obj === 'object' &&
9 [null, Object.prototype].includes(Object.getPrototypeOf(obj))) ||
10 Array.isArray(obj)
11 );
12}
13
14export function deepEqualIgnoringFns(
15 a: unknown,

Callers 1

deepEqualIgnoringFnsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected