MCPcopy
hub / github.com/reduxjs/react-redux / isPlainObject

Function isPlainObject

src/utils/isPlainObject.ts:5–17  ·  view source on GitHub ↗
(obj: unknown)

Source from the content-addressed store, hash-verified

3 * @returns {boolean} True if the argument appears to be a plain object.
4 */
5export default function isPlainObject(obj: unknown) {
6 if (typeof obj !== 'object' || obj === null) return false
7
8 const proto = Object.getPrototypeOf(obj)
9 if (proto === null) return true
10
11 let baseProto = proto
12 while (Object.getPrototypeOf(baseProto) !== null) {
13 baseProto = Object.getPrototypeOf(baseProto)
14 }
15
16 return proto === baseProto
17}

Callers 2

verifyPlainObjectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…