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 • 240 B
JavaScript
export function isEmail($,t=!1){const e="a-z"+(t?"":"A-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($)}