omrilotan / isbot

🤖/👨‍🦰 Detect bots/crawlers/spiders using the user agent string
https://isbot.js.org/
The Unlicense
921 stars 77 forks source link

Replace "pattern" export with "getPattern" method #243

Closed omrilotan closed 7 months ago

omrilotan commented 7 months ago

Motivation:

In builds where the tree-shaking was not removing the raw RegExp, it was causing breakage.

Resolution:

We will not expose the raw Regular expression. Instead - it will be safely built once with a fallback to a more naive pattern (no lookbehind).

This should:

Resolve #242 Resolve #236