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 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-fake-email-guard

v1.0.4

Published

Detect disposable/temporary email addresses in React Native and JavaScript apps

Readme

react-native-fake-email-guard

npm version npm downloads license

Lightweight, zero-dependency library to detect disposable and temporary email addresses. Works in React Native, React, and any JavaScript/TypeScript environment.

Bundles a curated blocklist of 500+ known disposable email providers (mailinator, tempmail, guerrillamail, yopmail, 10minutemail, trashmail, and hundreds more) — no network requests, works fully offline.


Installation

npm install react-native-fake-email-guard
# or
yarn add react-native-fake-email-guard

Usage

Basic check

import { isDisposableEmail, isFakeEmail, isValidEmail } from "react-native-fake-email-guard";

isDisposableEmail("[email protected]");  // true
isDisposableEmail("[email protected]");       // false

isFakeEmail("[email protected]");          // true  (alias)

isValidEmail("[email protected]");            // true  (format + not disposable)
isValidEmail("[email protected]");         // false
isValidEmail("notanemail");                // false

Detailed result

import { checkEmail } from "react-native-fake-email-guard";

const result = checkEmail("[email protected]");
// {
//   email: "[email protected]",
//   domain: "mailinator.com",
//   isDisposable: true
// }

Custom blocklist management

import { addBlockedDomains, removeBlockedDomains, resetBlocklist } from "react-native-fake-email-guard";

// Block additional domains specific to your use case
addBlockedDomains(["mycustomspam.io", "anotherfake.net"]);

// Whitelist a domain that's in the default blocklist
removeBlockedDomains(["mailinator.com"]);

// Restore the original default blocklist
resetBlocklist();

React Native Example

import React, { useState } from "react";
import { TextInput, Text, View, StyleSheet } from "react-native";
import { isDisposableEmail } from "react-native-fake-email-guard";

export function EmailInput() {
  const [email, setEmail] = useState("");
  const isInvalid = email.length > 0 && isDisposableEmail(email);

  return (
    <View>
      <TextInput
        value={email}
        onChangeText={setEmail}
        placeholder="Enter your email"
        autoCapitalize="none"
        keyboardType="email-address"
        style={[styles.input, isInvalid && styles.inputError]}
      />
      {isInvalid && (
        <Text style={styles.errorText}>
          Temporary email addresses are not allowed.
        </Text>
      )}
    </View>
  );
}

const styles = StyleSheet.create({
  input: {
    borderWidth: 1,
    borderColor: "#ccc",
    borderRadius: 8,
    padding: 12,
  },
  inputError: {
    borderColor: "#e53e3e",
  },
  errorText: {
    color: "#e53e3e",
    fontSize: 12,
    marginTop: 4,
  },
});

API

| Function | Signature | Description | |---|---|---| | isDisposableEmail | (email: string) => boolean | Returns true if the domain is a known disposable provider | | isFakeEmail | (email: string) => boolean | Alias for isDisposableEmail | | isValidEmail | (email: string) => boolean | Returns true if the email is well-formed AND not disposable | | checkEmail | (email: string) => EmailCheckResult | Returns a detailed result object | | addBlockedDomains | (domains: string[]) => void | Add custom domains to the blocklist | | removeBlockedDomains | (domains: string[]) => void | Remove domains from the blocklist (whitelist) | | getBlockedDomains | () => string[] | Returns all currently blocked domains | | resetBlocklist | () => void | Resets to the built-in default blocklist |

EmailCheckResult type

interface EmailCheckResult {
  email: string;
  domain: string;
  isDisposable: boolean;
}

Notes

  • All comparisons are case-insensitive
  • No network requests — detection is 100% offline
  • Blocklist changes via addBlockedDomains / removeBlockedDomains persist for the lifetime of the module
  • Fully typed — ships with TypeScript definitions out of the box

License

MIT