Appearance
BotDetectionService experimental
Allows to detect simple (non-sophisticated) bots.
Example usage:
ts
import { BotDetectionService } from '@naturalcycles/js-lib'
const botDetectionService = new BotDetectionService()
botDetectionService.isBot() // true/false
botDetectionService.isCDP() // true/false
botDetectionService.getBotReason() // BotReason enum
Demo
isBot: false isCDP: false isBotOrCDP: false botReason: null