You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 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.The text was updated successfully, but these errors were encountered: