react-waitlist
Version:
A customizable waitlist form component for React applications
25 lines (24 loc) • 794 B
TypeScript
import { SecurityConfig } from './types';
/**
* Generate a random honeypot field name
*/
export declare const generateHoneypotFieldName: () => string;
/**
* Get CSS styles for honeypot field
*/
export declare const getHoneypotStyles: () => React.CSSProperties;
/**
* Check if the submission time is suspicious (too fast)
*/
export declare const isSuspiciousSubmissionTime: (startTime: number, minTimeInMs?: number) => boolean;
/**
* Check if the submission is likely from a bot
*/
export declare const isLikelyBot: (honeypotValue: string | undefined, startTime: number, minTimeInMs?: number) => {
isBot: boolean;
reason?: string;
};
/**
* Check if reCAPTCHA is enabled in the security config
*/
export declare const isReCaptchaEnabled: (security?: SecurityConfig) => boolean;