@dahoom/disposable-email

中文文档
0.3.253发布于 2024/02/26MITTypeScriptCommonJS零依赖近 30 天下载 6608

a lightweight, no dependencies, regularly updated disposable email npm package with types forked from https://github.com/disposable/disposable

原始使用文档
文档目录3 节
  1. Examples
  2. Description
  3. Credits

Disposable email domains

a simple, no dependencies, regularly updated disposable email npm package with types forked from https://github.com/disposable/disposable

Update npm version installs install size minzip size

npm i @dahoom/disposable-email

I recommend using this serverside to avoid malicious workarounds

Examples

regular usage:

import disposable from "@dahoom/disposable-email";

const email = '[email protected]';

//returns true if the email is disposable, false if not
const temp = disposable.validate(email);

if(!temp){
  return 'disposable emails are not allowed';
}

if you just want to import the function itself:

import { validate } from "@dahoom/disposable-email";

const email = '[email protected]';

//returns true if the email is disposable, false if not
const temp = validate(email);

if(!temp){
  return 'disposable emails are not allowed';
}

Description

FunctionDescription
validate(domainOrEmail, callback)Validates if a domain or email is disposable.
ParameterDescription
domainOrEmailThe domain or email to validate.
callbackThe optional callback function to execute after validation.
ReturnsDescription
booleanReturns true if the domain or email is not disposable, false otherwise.

Credits

Types included from @types/disposable-email

Forked from https://github.com/disposable/disposable

A collection of domains for disposable email services like 10MinuteMail and GuerrillaMail. Also, some 🛠 to make your life easier.

版本与发布记录

@dahoom/disposable-email 共发布 258 个版本,首次发布于 2023/07/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.3.253latest2024/02/262 年前
0.3.2522024/02/252 年前
0.3.2512024/02/252 年前
0.3.2502024/02/252 年前
0.3.2492024/02/242 年前
0.3.2482024/02/242 年前

关于 @dahoom/disposable-email 的常见问题

@dahoom/disposable-email 是什么?

a lightweight, no dependencies, regularly updated disposable email npm package with types forked from https://github.com/disposable/disposable

如何安装 @dahoom/disposable-email?

在项目目录运行 npm install @dahoom/disposable-email,或使用 pnpm add / yarn add / bun add。

@dahoom/disposable-email 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@dahoom/disposable-email 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@dahoom/disposable-email 可以商用吗?

@dahoom/disposable-email 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@dahoom/disposable-email 的下载量有多少?

根据 npm 官方下载统计,@dahoom/disposable-email 在 2026/10/11 – 2026/11/09 这 30 天内被下载 6,608 次,日均约 220 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@dahoom/disposable-email 还在维护吗?

最新版本 0.3.253 发布于 2024/02/26(2 年前);至今共发布 258 个版本,其中过去 12 个月发布了 0 个;首次发布于 2023/07/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。