A single javascript function to check whether a provided email is in a valid form.
import isValidEmail from './isValidEmail';
const email = "myemail27@gmail.com";
console.log(isValidEmail(email));
>true
~$
import isValidEmail from './isValidEmail';
const invalid_email = "$myemail27@gmail.com";
console.log(isValidEmail(invalid_email));
>false
~$