DEV Community

Discussion on: Back to basics: Naming

Collapse
 
alephnaught2tog profile image
Max Cerrina • Edited

My own preference is for is... naming; it makes it clear that it's a boolean. I'd say isEmailValid or isEmail -- but with different contects. isEmail to me implies you are checking whether it's an email at all, but isEmailValid is checking if it is a valid email. A valid email is certainly an email.

Honestly, I'd probably have both, for different purposes. They read as completely distinct.