UNPKG

@emailcheck/email-validator-js

Version:

Advanced email validation with MX records, SMTP verification, disposable email detection, batch processing, and caching. Production-ready with TypeScript support.

20 lines (19 loc) 634 B
import { type LRU } from 'tiny-lru'; import type { CacheStore } from '../cache-interface'; /** * Adapter to make tiny-lru compatible with our cache interface */ export declare class LRUAdapter<T> implements CacheStore<T> { private lru; constructor(maxSize?: number, ttlMs?: number); get(key: string): T | null | undefined; set(key: string, value: T, ttlMs?: number): Promise<void>; delete(key: string): Promise<boolean>; has(key: string): Promise<boolean>; clear(): Promise<void>; size(): number; /** * Get the underlying LRU instance for advanced operations */ getLRU(): LRU<T>; }