
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@toolz/looks-like-email
Advanced tools
A utility function that determines whether a given string looks like a valid email address
looks-like-email is a utility function that determines whether a string looks like a valid email address. Obviously, this function cannot tell whether a string represents a working email address. But this utility performs a series of checks to ensure that the input at least appears to be a valid email address.
After installation, import the package:
import { looksLikeEmail } from '@toolz/looks-like-email';
Given any string, looksLikeEmail() performs the following validates that:
@ symbol.@ symbol does not appear the beginning or end of the string. (The portion before the @ symbol is the "local part". The portion after it is the "domain part").This utility uses @toolz/string-contains to look for alphanumerics across the UTF-8 spectrum. This means that letters are accepted when they are outside the ASCII range.
const API = {
arguments: {
string: {
required,
format: string,
},
showWarnings: {
optional,
format: Boolean,
defaultValue: false,
},
},
returns: Boolean,
}
Examples:
looksLikeEmail('adam@bytebodger@foo.com'); // FALSE
looksLikeEmail('@adambytebodger.com'); // FALSE
looksLikeEmail('abcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzy@bytebodger.com'); // FALSE
looksLikeEmail('adambytebodger.com@'); // FALSE
looksLikeEmail('ad[am@bytebodger.com'); // FALSE
looksLikeEmail('ad..am@bytebodger.com'); // FALSE
looksLikeEmail('abc@defghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzydefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzyabcdefghijklmnopqrstuvwxzybytebodger.com'); // FALSE
looksLikeEmail('adam@bytebodgercom'); // FALSE
looksLikeEmail('adam@bytebodgerbytebodgercombytebodgercombytebodgercombytebodgercombytebodgercombytebodgercombytebodgercom.com'); // FALSE
looksLikeEmail('adam@byte*bodger.com'); // FALSE
looksLikeEmail('adam@byte.-bodger.com'); // FALSE
looksLikeEmail('adam@byte-.bodger.com'); // FALSE
looksLikeEmail('adam@byte-.bodger.com', true); // FALSE (with console warning about the error)
looksLikeEmail('adam@byte.bodger.com'); // TRUE
looksLikeEmail('adam_davis1@byte.bodger.com'); TRUE
FAQs
A utility function that determines whether a given string looks like a valid email address
We found that @toolz/looks-like-email demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.