UNPKG

which-bot

Version:

detect which bot is from user-agent and is trustable

13 lines (12 loc) 403 B
import { RuleItem } from './rules'; export declare const serializeRules: (rules: RuleItem[]) => Array<RuleItem & { pattern: RegExp; }>; export declare const match: (ua: string, rules: Array<RuleItem & { pattern: RegExp; }>) => false | { company: string; name: string; hosts: string[] | undefined; }; export declare const isValidIp: (hosts: string[], ip: string) => Promise<boolean>;