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

Function isPlainObject

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

Source from the content-addressed store, hash-verified

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

Callers 4

dispatchFunction · 0.85
isActionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected