
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
email-normalizer
Advanced tools
A simple Node.js package to normalize email addresses by removing dots, stripping plus signs, and handling domain renaming.
googlemail.com to gmail.com)You can install the package using pnpm, npm, or yarn:
pnpm add email-normalizer
# or
npm install email-normalizer
# or
yarn add email-normalizer
Here's how you can use the email-normalizer package:
import { normalizeEmail } from 'email-normalizer';
const email = 'User.Name+tag@gmail.com';
const normalizedEmail = normalizeEmail({ email });
console.log(normalizedEmail); // Output: username@gmail.com
Note: An error will be thrown if the provided email address is invalid.
normalizeEmail({ email: string }): stringNormalizes the provided email address based on the configured rules for various domains.
Parameters:
email: The email address to be normalized.Returns:
The normalization rules are predefined for the following domains:
gmail.com: Removes dots, strips plus sign and tags.googlemail.com: Removes dots, strips plus sign and tags, renames domain to gmail.com.hotmail.com: Strips plus sign and tags.live.com: Removes dots, strips plus sign and tags.outlook.com: Strips plus sign and tags.The package.json includes several useful scripts:
build: Builds the package using unbuild.lint: Lints the codebase using eslint.lint:fix: Fixes linting errors.test: Runs all tests.test:unit: Runs unit tests using vitest.test:unit:watch: Runs unit tests in watch mode.To contribute to this project, clone the repository and install the dependencies:
git clone https://github.com/CorentinTh/email-normalizer.git
cd email-normalizer
pnpm install
You can then build, lint, and test the project using the provided scripts.
This project is licensed under the MIT License. See the LICENSE file for details.
Support this project through GitHub Sponsors.
Developed by Corentin Th. You can reach out via email.
FAQs
Normalize email addresses
We found that email-normalizer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.