@nestbolt/disposable-email
Installation
Install @nestbolt/disposable-email and its peer dependencies in your NestJS project.
Install the Package
Install @nestbolt/disposable-email using your preferred package manager:
npm install @nestbolt/disposable-emailOr with yarn:
yarn add @nestbolt/disposable-emailOr with pnpm:
pnpm add @nestbolt/disposable-emailPeer Dependencies
This package requires the following peer dependencies. In a typical NestJS project, most of these are already installed:
| Package | Required Version |
|---|---|
@nestjs/common | ^10.0.0 || ^11.0.0 |
@nestjs/core | ^10.0.0 || ^11.0.0 |
class-validator | ^0.14.0 |
class-transformer | ^0.5.0 |
reflect-metadata | ^0.1.13 || ^0.2.0 |
If any of these are missing from your project, install them:
npm install @nestjs/common @nestjs/core class-validator class-transformer reflect-metadataCompatibility
NestJS Versions
The package supports both NestJS 10 and NestJS 11. The module uses standard NestJS dynamic module patterns (forRoot / forRootAsync) and does not depend on any version-specific internals, so it works seamlessly with either major version.
Node.js
The package requires Node.js 18 or later. This is because the DefaultFetcher uses the native fetch() API (available globally since Node.js 18) for retrieving remote domain lists. If you are running an older Node.js version, you can provide a custom fetcher that uses a different HTTP client such as axios or node-fetch.
TypeScript
The package is written in TypeScript and ships with full type declarations. No additional @types/* packages are needed.
Verifying the Installation
After installing, you can verify that everything is in place by importing the module in your AppModule:
import { Module } from "@nestjs/common";
import { DisposableEmailModule } from "@nestbolt/disposable-email";
@Module({
imports: [DisposableEmailModule.forRoot()],
})
export class AppModule {}If the application starts without errors, the package is correctly installed. The module logs a message at startup indicating how many disposable domains were loaded:
[DisposableEmailService] Loaded 37123 disposable domainsNext Steps
Once installed, proceed to the Quick Start guide to set up the module, configure validation, and start blocking disposable emails.