Checks if value is the language type of Object, that is, a value that is not null and has a typeof result of function or object and has no own enumerable string-keyed properties.
value
Object
null
typeof
function
object
The value to check.
Returns true if value is an empty object, else false.
true
false
isEmptyObject({})// => trueisEmptyObject({ a: 1, b: 2, c: 3 })// => false Copy
isEmptyObject({})// => trueisEmptyObject({ a: 1, b: 2, c: 3 })// => false
Checks if
valueis the language type ofObject, that is, a value that is notnulland has atypeofresult offunctionorobjectand has no own enumerable string-keyed properties.