DEV Community

Discussion on: Check if an object is empty

Collapse
 
ml318097 profile image
Mehul Lakhanpal

I don't know. Depends on the situation.

Collapse
 
sumukhesh profile image
Sumukhesh

One situation i can think of is to use this a validation for data in forms.

Thread Thread
 
pentacular profile image
pentacular

l don't think that makes sense.

When validating you would want to check the requirements for that form, not that it was an empty object.

Collapse
 
pentacular profile image
pentacular

Can you think of a situation where it would be the reasonable thing to do? :)