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 🙏

© 2024 – Pkg Stats / Ryan Hefner

email-to-name

v2.0.7

Published

A Node.js and web browser compatible script that takes an email address and tries to generate a name.

Downloads

4,736

Readme

Tests npm bundle size npm

Email to Name

A Node.js and web browser compatible script that takes an email address and tries to generate a name.

image

Company Names

Privacy conscious individuals often use the name of website as the email identifier. If Jane Smith has her own domain name with an email server, she might sign up as [email protected]. That way if "Suspicious Website" ends up selling her email address on to a third party, if they send this exact email address spam, it's possible to see who leaked her email address.

It's also therefore possible to invert this method and detect the personal domain if the email identifier matches your company/website name.

No Company Names

With Company Names

  • emailToName.process('[email protected]', { companyNames: ['acg', 'acloudguru'] })
    • Output: Janesmith

Common Email Identifiers

Users who operate a personal email domain sometimes use prefixes like contact, hello, me and others. This script also tries to invert those.

Parameters

| Value | Default | Example (Input) | Example (On) | Example (Off) | | -------------------------------- | ------- | ------------------------------- | --------------------- | --------------------- | | removePlusWords | true | [email protected] | Tait Brown | Tait Brown+test | | removeNumbers | true | [email protected] | Tait | Tait123 | | titleCase | true | [email protected] | Tait Brown | tait brown | | caseMc | true | [email protected] | John McKim | John Mckim | | caseLetterApostrophe | true | flannery.o'[email protected] | Flannery O'Connor | Flannery O'connor | | uppercaseGenerationalNumbers | true | [email protected] | Tait Brown III | Tait Brown Iii | | commaPrependGenerationalPhrase | true | [email protected] | Tait Brown, Jr. | Tait Brown Jr | | appendPeriodToTitlePrefix | true | [email protected] | Prof. Tait Brown | Prof Tait Brown | | lowercaseFamilyParticle | true | [email protected] | Dutch van der Linde | Dutch Van Der Linde |

Default Values

Common Personal Identifiers

Attempt to use the domain name as the personal identifier when these common email identifiers are used 'hello', 'me', 'email', 'contact'

Generational Suffixes

Prepend a comma and append a period for the following, when at the end of a string and preceded by a space 'jr', 'jnr', 'sr', 'snr'

Generational Numbers

Uppercase these whe at the end of a string and preceded by a space 'ii', 'iii', 'iv'

Titles

Append a period when the following occur at the beginning of a string and are followed by a space 'mr', 'mrs', 'ms', 'dr', 'prof'

Development

Run tests. Requires yarn.

yarn test

Contributors

Changelog

  • 2.0.7 - Added types (thanks @felipehertzer )
  • 2.0.[1..6] - Adding release task wasted commits
  • 2.0.0 - Building with esbuild with browser targets chrome58,firefox57,safari11,edge16
  • 1.1.0 - Borrowed heavily from namecase libraries
    • ADDED: Various lowercase conjunctions "son/daughter of" as per namecase
  • 1.0.0 Breaking Change: Relocated company names and common personal identifiers to params
  • 0.2.0 Bugfix: Couldn't use in browser due to module check
  • 0.1.0 added generational handling (Jr, Sr, III etc) as well as titles (Mr, Mrs, Dr, Prof)
  • 0.0.0 init commit