Bot detection library that runs in the browser. Detects automation tools and frameworks. No server required, runs 100% on the client. MIT license, no usage restrictions.
We're trying to implement botd by using collect() client-side, sending the components to the server and then running detect() there.
The current BotDetector class interface does not allow that kind of use.
My suggestion: move detect and collect into standalone functions that are exported.
The BotDetector class could use those functions itself too, to prevent code duplication. (this would also allow tree-shaking to remove the BotDetector class or detectors - assuming they are marked as pure)
The client-side is possible to implement manually (by copying the function out of the class and adapting it), because luckily the sources list is exported.
The server-side validation is impossible because detectors is not currently being exported.
We're trying to implement botd by using
collect()
client-side, sending the components to the server and then runningdetect()
there. The current BotDetector class interface does not allow that kind of use.My suggestion: move
detect
andcollect
into standalone functions that are exported. The BotDetector class could use those functions itself too, to prevent code duplication. (this would also allow tree-shaking to remove the BotDetector class ordetectors
- assuming they are marked as pure)The client-side is possible to implement manually (by copying the function out of the class and adapting it), because luckily the
sources
list is exported. The server-side validation is impossible becausedetectors
is not currently being exported.