qsu
Version:
qsu is a utility library that contains useful and frequently used functions. Start with your preferred language and the modern development environment.
1 lines • 238 B
JavaScript
export function isEmail($,t=!1){const e=t?"a-z":"a-zA-Z";return new RegExp(`^[${e}0-9!#$%&'*+/=?^_\`{|}~-]+(?:\\.[${e}0-9!#$%&'*+/=?^_\`{|}~-]+)*@(?:[${e}0-9](?:[${e}0-9-]*[${e}0-9])?\\.)+[${e}0-9](?:[${e}0-9-]*[${e}0-9])?$`,"g").test($)}