Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
sane-email-validation
Advanced tools
Sanely validate email addresses, based on HTML5's definition of email addresses
There are lots of email address validation modules, but none of them seem to check for sane email addresses. This one does. If you don't agree, please file an issue and convince me why.
npm install sane-email-validation
const isEmail = require('sane-email-validation')
const email = '...'
if (isEmail(email)) {
console.log(`${email} is valid.`)
} else {
console.log(`${email} is not valid.`)
}
isNotEmail()
An inverted check is also exposed.
const isNotEmail = require('sane-email-validation').isNotEmail
const email = '...'
if (isNotEmail(email)) {
console.log(`${email} is not valid.`)
} else {
console.log(`${email} is valid.`)
}
isAsciiEmail()
An ASCII only version of the validator.
Since internationalized email addresses are not fully supported by all infrastructure, some systems may want to limit what they consider valid. See International email and the Email Address Internationalization on Wikipedia for more information.
const isAsciiEmail = require('sane-email-validation').isAsciiEmail
const email = '...'
if (isAsciiEmail(email)) {
console.log(`${email} is valid.`)
} else {
console.log(`${email} is not valid.`)
}
isNotEmail()
An inverted check is also exposed for the ASCII only version.
const isNotAsciiEmail = require('sane-email-validation').isNotAsciiEmail
const email = '...'
if (isNotAsciiEmail(email)) {
console.log(`${email} is not valid.`)
} else {
console.log(`${email} is valid.`)
}
Copyright Sane Email Validation contributors. Released under the terms of the MIT license.
FAQs
Sanely validate email addresses, based on HTML5's definition of email addresses
The npm package sane-email-validation receives a total of 3,732 weekly downloads. As such, sane-email-validation popularity was classified as popular.
We found that sane-email-validation 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.