
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
parse-email-address
Advanced tools
Parse/validate email address with RFC-5321 and sane size limits.
Parse, validate, and normalize email addresses, primarily using RFC-5321.
Full docs: https://electrovir.github.io/parse-email-address
This uses and is based on smtp-address-parser
v1.1.0, so it has the following features (from smtp-address-parser
):
name@example.org
name@example
name@example.x
This package adds the following features:
npm i parse-email-address
import {isValidEmailAddress, normalizeEmailAddress, parseEmailAddress} from 'parse-email-address';
/**
* Parse email addresses into parts with `parseEmailAddress`. Returns `undefined` if the input is an
* invalid email address.
*/
parseEmailAddress('simple@example.org'); // returns `{user: 'simple', domain: 'example.org', full: 'simple@example.org'}`
parseEmailAddress('tld-too-short@foo.x'); // returns `undefined`
/**
* Normalize email addresses for string comparisons with `normalizeEmailAddress`. Returns
* `undefined` if the input is an invalid email address.
*/
normalizeEmailAddress('SIMPLE@EXAMPLE.ORG'); // returns `'simple@example.org'`
normalizeEmailAddress('tld-too-short@foo.x'); // returns `undefined`
/** Check if an email address is valid with `isValidEmailAddress`. */
isValidEmailAddress('simple@example.org'); // returns `true`
isValidEmailAddress('SIMPLE@EXAMPLE.ORG'); // returns `true`
isValidEmailAddress('tld-too-short@foo.x'); // returns `false`
FAQs
Parse/validate email address with RFC-5321 and sane size limits.
We found that parse-email-address demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.