The value to validate.
OptionalincludeHidden: booleanWhether to include non-enumerable and symbol properties.
true if the value is an empty plain object, false otherwise.
A value is considered empty if it is a plain object with no own properties.
By default, only enumerable string-keyed properties are checked.
When includeHidden is enabled, all own properties are considered,
including non-enumerable and symbol properties.
For checking an empty array, consider using
isEmptyArray.
Default behavior:
| Value | Result |
|---|---|
{} |
true |
{ a: 1 } |
false |
Object.create(null) |
true |
[] |
false |
new Date() |
false |
{ [Symbol('a')]: 1 } |
true |
With includeHidden set to true:
| Value | Result |
|---|---|
{} |
true |
{ [Symbol('a')]: 1 } |
false |
Determines whether the provided value is an empty plain object.