UNPKG

which-bot

Version:

detect which bot is from user-agent and is trustable

16 lines (15 loc) 472 B
import RULES from './rules'; interface BotItem { name: string; company: string; mobile: boolean; } declare function parse(ua: string): BotItem | false; declare function parse(ua: string, ip: string): Promise<(BotItem & { valid: boolean; }) | false>; declare function is(name: string, ua: string): BotItem | false; declare function is(name: string, ua: string, ip: string): Promise<(BotItem & { valid: boolean; }) | false>; export { parse, is, RULES };