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-amender

v0.2.2

Published

Rectify your user email address inputs from common spelling mistakes, probably due to the new MacBook Pro keyboard.

Downloads

3

Readme

Email Amender

Build Status npm version codecov Known Vulnerabilities

An opinionated library on how to correct fat-fingered and mis-typed email addresses from user input.

How it Works

  1. It trims and lowercases the input email address. If it's falsy, i.e. it returns null.
  2. Then it splits the email string into domain, TLD (Top Level Domain), and SLD (Second Level Domain). Note: .co.uk among other non-US TLDs would break this, which will be addressed in future versions of Email Amender.
  3. It checks to see if the TLD exists in a common list of TLDs. If so it skips to the next step. Otherwise:
    1. It first checks to the ceo the user input TLD begins with one of the common TLDs, which is a cheap check to see if extra letters happened to be added on. An example would be when a user thinks they've moved to the nexxt form field, and started typing more into the email address input field.
    2. If there is nothing found, it uses fuzzyset.js to fine the nearest probable match to one of the common TLDs.
  4. This is super primitive right now._ It checks to see if the SLD exists in a common list of SLDs. If the SLD doesn't exist in the preset list, it checks to see if there's one using fuzzyset.js, but requires an 80% probability. See the TODOs.

Development

Just run yarn, and then run yarn test to see if everything is working right.

To try to solve the failing tests, use yarn test:failing to check your work.

Credits