@emailverifier/sdk

中文文档
0.1.75发布于 2026/11/13MITTypeScriptESM + CJS零依赖近 30 天下载 4871

Email verifier SDK with free offline checks, the emailverifier.dev API client, and a CLI.

原始使用文档
文档目录5 节
  1. Install
  2. Free offline analysis
  3. Hosted verification
  4. CLI
  5. License

Email Verifier SDK

Offline email analysis, a typed client for emailverifier.dev, and a CLI in one package.

The offline functions use bundled data and make no network requests. They can identify syntax problems, disposable providers, free mailbox providers, role addresses, and common provider typos. They cannot confirm whether a mailbox exists or will accept mail.

Install

npm install @emailverifier/sdk

Node.js 20 or newer is required. The package has no runtime dependencies and sends no telemetry.

Free offline analysis

import { analyzeEmail } from '@emailverifier/sdk/offline'

const result = analyzeEmail('[email protected]')

console.log(result.checks.syntax)
console.log(result.checks.disposable)
console.log(result.checks.freeProvider)
console.log(result.checks.roleBased)
console.log(result.suggestion)

The result intentionally has no deliverable field. DNS, SMTP recipient acceptance, and catch-all detection require the hosted API.

You can also import focused helpers:

import {
  isDisposableDomain,
  isFreeEmailProvider,
  isRoleAddress
} from '@emailverifier/sdk/offline'

Hosted verification

Create a project at emailverifier.dev, then use its API key:

import { EmailVerifier } from '@emailverifier/sdk'

const client = new EmailVerifier({
  apiKey: process.env.EMAILVERIFIER_API_KEY!
})

const verification = await client.verify('[email protected]')
const domain = await client.checkDomain('example.com')
const usage = await client.getUsage()

verify and checkDomain each use one project credit. getUsage does not use a credit. The client does not retry failed requests automatically.

CLI

Run local analysis without an account or API key:

npx @emailverifier/sdk check [email protected]
npx @emailverifier/sdk check [email protected] --json

Remote commands read the key from the environment. API keys are deliberately not accepted as command-line arguments because command histories and process lists can expose them.

export EMAILVERIFIER_API_KEY=ev_your_project_key

npx @emailverifier/sdk verify [email protected]
npx @emailverifier/sdk domain example.com
npx @emailverifier/sdk usage

Use EMAILVERIFIER_BASE_URL only when testing against a local or self-selected API origin.

License

MIT

版本与发布记录

@emailverifier/sdk 共发布 75 个版本,首次发布于 2026/08/27;过去 12 个月发布了 75 个版本。

版本发布日期距今
0.1.75latest2026/11/13今天
0.1.742026/11/121 天前
0.1.732026/11/112 天前
0.1.722026/11/103 天前
0.1.712026/11/094 天前
0.1.702026/11/085 天前

关于 @emailverifier/sdk 的常见问题

@emailverifier/sdk 是什么?

Email verifier SDK with free offline checks, the emailverifier.dev API client, and a CLI.

如何安装 @emailverifier/sdk?

在项目目录运行 npm install @emailverifier/sdk,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 emailverifier,可以用 npx emailverifier 直接运行。

@emailverifier/sdk 支持 TypeScript 吗?

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

@emailverifier/sdk 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@emailverifier/sdk 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@emailverifier/sdk 可以商用吗?

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

@emailverifier/sdk 的下载量有多少?

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

@emailverifier/sdk 还在维护吗?

最新版本 0.1.75 发布于 2026/11/13(今天);至今共发布 75 个版本,其中过去 12 个月发布了 75 个;首次发布于 2026/08/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。