JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q35448F
  • License MIT

An email utility to validate addresses, detect disposable domains, and normalize Gmail aliases for more secure user identification.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (email-sentry) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    📧 email-sentry

    Author NPM version License: MIT Run Tests


    email-sentry is a lightweight and production-ready utility to:

    • ✅ Validate email format
    • 🚫 Detect disposable/temp email domains
    • 📩 Normalize Gmail aliases (e.g. user+promo@gmail.comuser@gmail.com)

    Features

    • Simple API
    • Tiny & dependency-light
    • Helps prevent spam/bots during user signups
    • Supports thousands of disposable email providers
    • Built in TypeScript (fully typed)

    Installation

    npm install email-sentry
    # or
    yarn add email-sentry

    Usage

    import { emailSentry } from "email-sentry";
    
    const result = emailSentry("user+promo@mailinator.com", {
      validate: true,
      checkDisposable: true,
      normalizeGmailAliases: true,
    });
    
    console.log(result);
    /*
    {
      inputEmail: 'user+promo@mailinator.com',
      success: true,
      isValid: true,
      isDisposable: true,
      outputEmail: 'user@gmail.com'
    }
    */

    Options

    Option Type Description
    validate boolean Validates email using the powerful email validator package
    checkDisposable boolean Checks against known disposable email domains, contains 5000+ disposable domains data
    normalizeGmailAliases boolean Removes +something from Gmail addresses and prevent the same email address to use to create account

    Testing

    Run all tests with:

    npm test

    Or watch mode:

    npm run test:watch

    License

    MIT © Yashraj


    Author

    Made with ❤️ by Yashraj

    If you like this project, consider ⭐️ starring the repo or sharing it. It helps a lot!