isPlainObject<T>(value: unknown, loose?: boolean): value is T
Like isObject but only returns true if the value is a plain object
(no class instances, built-ins, etc). It achieves this by comparing
the value's prototype to the built-in Object types. If you need to
run these checks for cross-realm objects, pass true to the loose argument.
Like
isObject
but only returns true if the value is a plain object (no class instances, built-ins, etc). It achieves this by comparing the value's prototype to the built-inObject
types. If you need to run these checks for cross-realm objects, pass true to theloose
argument.