@vouch-in/js
v0.1.7
Published
Vouch SDK for JavaScript - Email validation and device fingerprinting
Readme
@vouch-in/js
Official Vouch SDK for JavaScript - Email validation and device fingerprinting for browser applications.
Installation
npm install @vouch-in/js
# or
yarn add @vouch-in/js
# or
pnpm add @vouch-in/jsQuick Start
import { Vouch } from "@vouch-in/js";
// Initialize with your credentials
const vouch = new Vouch("your-project-id", "your-client-api-key");
// Validate an email
const result = await vouch.validate("[email protected]");
if (result.recommendation === "allow") {
console.log("Email is valid!");
} else {
// Check specific validations
if (!result.checks.syntax?.pass) {
console.log("Invalid email format");
} else if (!result.checks.disposable?.pass) {
console.log("Disposable emails not allowed");
}
}Features
- Email syntax validation
- Disposable email detection
- MX record verification
- Device fingerprinting
- IP reputation checking
- Role email detection
- Alias detection
Response Structure
interface ValidationResponse {
checks: Record<string, CheckResult>;
metadata: {
fingerprintHash: string | null;
previousSignups: number;
totalLatency: number;
};
recommendation: "allow" | "block" | "flag";
signals: string[];
}Documentation
For complete documentation, examples, and API reference, visit:
docs.vouch.expert/sdks/javascript
Related Packages
- @vouch-in/react - React hooks and components
- @vouch-in/node - Server-side validation
- @vouch-in/next - Next.js integration
- @vouch-in/remix - Remix integration
License
Proprietary. Copyright (c) Vouch. All rights reserved.
See the SDK License Agreement for terms.
