this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

updated tests

akshat 44308f7e 0d3f5ace

+8 -6
+1 -1
README.md
··· 29 29 ``` 30 30 31 31 ```javascript 32 - import { disposableEmailDetector } from 'disposable-email-detector'; 32 + import disposableEmailDetector from 'disposable-email-detector'; 33 33 34 34 const email = 'test@mailinator.com'; 35 35
+7 -5
test/usage.ts
··· 1 1 import fs from 'fs/promises'; 2 - import { disposableEmailDetector } from './index.js'; // Adjust path as needed 3 - import path from 'path'; 2 + import disposableEmailDetector from "../index" 3 + import path from 'path'; 4 + 4 5 // Load test emails from file 5 - const filePath = path.join(__dirname ,'./testEmails.txt'); 6 - async function loadTestEmails(filePath) { 6 + const filePath: string = path.join(__dirname, './testEmails.txt'); 7 + 8 + async function loadTestEmails(filePath: string): Promise<string[]> { 7 9 const rawData = await fs.readFile(filePath); 8 10 return rawData.toString().trim().split('\n'); 9 11 } 10 12 11 13 async function runTests() { 12 - const testEmails = await loadTestEmails('./testEmails.txt'); 14 + const testEmails = await loadTestEmails(filePath); 13 15 14 16 for (const email of testEmails) { 15 17 const isDisposable = await disposableEmailDetector(email);