
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
valid-email
Advanced tools
Regular expression validation is often useful, but also often inaccurate. Sometimes it's just better to do it manually.
console.log(require('valid-email')('john@iamjohnhenry.com'))//#true
console.log(require('valid-email')('iamjohnhenry.com'))//#false
There are some cases in which this library present the user with false negatives (See this issue.
This library is considered a "good enough" implementation for most use cases and is meant to provide a simple method of validating email about which most coders can reason.
There are other methods which may be more accurate but more difficult ensure that it's doing what it's doing. (See https://emailregex.com/).
Please be aware of the levels of accuracy your application needs.
This code is compiled from untested code found on stackoverflow and is mainly intended for academic purposes. Use at your own risk.
Much thanks to @davisjam for helping me to patch a recent security vunerability https://github.com/johnhenry/valid-email/issues/4 .
FAQs
Test the validity of an email address
The npm package valid-email receives a total of 68 weekly downloads. As such, valid-email popularity was classified as not popular.
We found that valid-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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.