Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
email-regex
Advanced tools
Regular expression for matching email addresses
Use it for finding email addresses or checking if something is email like.
You shouldn't use this for validating emails. Only for hinting to the user.
$ npm install email-regex
import emailRegex from 'email-regex';
// Contains an email address
emailRegex().test('unicorn sindresorhus@gmail.com');
//=> true
// Is an email address
emailRegex({exact: true}).test('sindresorhus@gmail.com');
//=> true
'unicorn sindresorhus@gmail.com cake john@doe.com rainbow'.match(emailRegex());
//=> ['sindresorhus@gmail.com', 'john@doe.com']
Returns a regex for matching email addresses.
Type: object
Type: boolean
Default: false
(Matches any email address in a string)
Only match an exact string.
Useful with RegExp#test
to check if a string is an email address.
FAQs
Regular expression for matching email addresses
We found that email-regex 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.