Personally, I would use the third option because it looks great along with the if statement.
About the first, I think is not an appropriate name: the function's name says that the function will do some kind of modifications to the input email and then, return it.
About the second, I would use it if email were an object:
classEmail{constructor(email){this.email=email;}getuser(){//return text before '@'}getdomain(){//return domain}gettld(){//return top-level-domain}isValid(){//validate email string given in constructor}}
Personally, I would use the third option because it looks great along with the if statement.
About the first, I think is not an appropriate name: the function's name says that the function will do some kind of modifications to the input email and then, return it.
About the second, I would use it if email were an object:
Only if you have an email object :-D
Interesting. And what would be the structure of that email object.
I think it will be like this:
For a lexical analyzer or something like that
not meaning to troll or so, but you can have user@ipaddress as a validemail ;)