npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

generic-emails

v1.4.1

Published

The list of generic email found on the web with department name

Downloads

208

Readme

Generic Emails Checker

npm version GitHub license

A comprehensive TypeScript/JavaScript library for detecting generic email addresses and extracting metadata such as department, seniority, and position information. This package contains a curated list of over 27,000 generic email patterns found on the web.

Features

  • Check if an email address is generic (e.g., info@, contact@, support@)
  • Validate email address format
  • Extract department information (engineering, sales, hr, etc.)
  • Identify seniority level (junior, senior, executive)
  • Determine position type
  • Extensive database of 27,000+ generic email patterns
  • TypeScript support with full type definitions
  • Works in Node.js and browsers
  • Zero dependencies (runtime)

Installation

npm install generic-emails

or using yarn:

yarn add generic-emails

Quick Start

const { GenericEmail } = require('generic-emails')

// Check if an email is generic
const result = await GenericEmail.isGeneric('[email protected]')
console.log(result)
// Output:
// {
//   email: '[email protected]',
//   isgeneric: true,
//   department: null,
//   position: null,
//   seniority: null
// }

Usage

Check Generic Email

The main functionality is to determine if an email address is generic and retrieve associated metadata:

const { GenericEmail } = require('generic-emails');

async function checkEmail() {
  const result = await GenericEmail.isGeneric('[email protected]');

  if (result.isgeneric) {
    console.log('This is a generic email');
    console.log('Department:', result.department);
    console.log('Position:', result.position);
    console.log('Seniority:', result.seniority);
  } else {
    console.log('This is a personal email');
  }
}

checkEmail();
```### Email Validation

Validate email addresses and detect hash-based patterns:

```javascript
const { Emails } = require('generic-emails');

try {
  const isValid = Emails.validate('[email protected]');
  console.log('Email is valid:', isValid);
} catch (error) {
  console.error('Invalid email:', error.message);
}

Department Validation

Validate department names against supported types:

const { Department } = require('generic-emails')

const isValid = Department.validate('engineering')
console.log('Valid department:', isValid)

Supported departments: engineering, sales, finance, it, hr, marketing, operations, management, executive, legal, support, communication, software, security, pr, warehouse, diversity, administrative, facilities, accounting

Seniority Validation

Check seniority levels:

const { Seniority } = require('generic-emails')

const isValid = Seniority.validate('senior')
console.log('Valid seniority:', isValid)

Supported seniority levels: junior, senior, executive

TypeScript Usage

The library is written in TypeScript and includes full type definitions:

import { GenericEmail, GenericData, Email } from 'generic-emails'
import { Departmentname } from 'generic-emails'
import { Seniorityname } from 'generic-emails'

async function checkGenericEmail(email: string): Promise<GenericData> {
  const result = await GenericEmail.isGeneric(email)
  return result
}

// Use type-safe department names
const department: Departmentname = 'engineering'

// Use type-safe seniority names
const seniority: Seniorityname = 'senior'

API Reference

GenericEmail.isGeneric(email: string): Promise<GenericData>

Checks if an email address is generic and returns metadata.

Parameters:

  • email (string): The email address to check (can be full email or just the local part)

Returns: Promise<GenericData>

interface GenericData {
  email?: string
  isgeneric?: boolean
  department?: string
  position?: string
  seniority?: string
}

Emails.validate(email: string): boolean

Validates an email address format and checks for hash-based patterns.

Parameters:

  • email (string): The email address to validate

Returns: boolean - Returns true if valid, throws error if invalid

Department.validate(name: Departmentname): boolean

Validates a department name.

Parameters:

  • name (Departmentname): The department name to validate

Returns: boolean

Seniority.validate(name: Seniorityname): boolean

Validates a seniority level.

Parameters:

  • name (Seniorityname): The seniority level to validate

Returns: boolean

Examples

Check out the examples directory for more detailed usage examples:

Data Source

The package includes a comprehensive emails.json file containing over 27,000 generic email patterns collected from the web. Each entry may include:

  • Email pattern (local part before @)
  • Department classification
  • Position information
  • Seniority level

Use Cases

  • Lead Qualification: Filter out generic emails to focus on personal contacts
  • Email List Cleaning: Remove generic addresses from marketing campaigns
  • Contact Discovery: Identify department-specific emails for targeted outreach
  • Data Enrichment: Add department and seniority metadata to email addresses
  • Form Validation: Encourage users to provide personal rather than generic emails

Contributing

We welcome contributions! Here's how you can help:

  1. Fork it (https://github.com/tomba-io/generic-emails/fork)
  2. Create your feature branch (git checkout -b my-new-email)
  3. Add generic emails to emails.json with appropriate metadata
  4. Run jq command to sort emails.json (jq -S . emails.json > temp.json && mv temp.json emails.json)
  5. Run tests to ensure everything works (npm test)
  6. Commit your changes (git commit -am 'Add new email patterns')
  7. Push to the branch (git push origin my-new-email)
  8. Create a new Pull Request

Adding New Generic Emails

When adding new entries to emails.json, please follow this format:

{
  "email": "support",
  "department": "support",
  "position": "support",
  "seniority": null
}

Requirements

  • Node.js >= 16.x
  • TypeScript >= 3.0 (for development)

Contributors

License

GitHub license

MIT License - see the LICENSE file for details

Related Projects

  • Tomba.io - Email Finder and Verification API

Support

For questions and support, please open an issue on GitHub.