isbot
Advanced tools
Changelog
Changelog
This change is meant to reduce the size of the package and improve performance by building the regular expression in build time instead of runtime.
Change interface
import { isbot } from "isbot";
isbot
attached functions from the interface. isbot.<SOMETHING>
is no longer supportedDrop support for EOL node versions
import { <SOMETHING> } from "isbot";
| import | Type | Description | | ------------- | --------------------------------------------------- | ------------------------------------------------------------------------- | | pattern | {RegExp} | The regular expression used to identify bots | | list | {string[]} | List of all individual pattern parts | | isbotMatch | {(userAgent: string): string | null} | The substring matched by the regular expression | | isbotMatches | {(userAgent: string): string[]} | All substrings matched by the regular expression | | isbotPattern | {(userAgent: string): string | null} | The regular expression used to identify bot substring in the user agent | | isbotPatterns | {(userAgent: string): string[]} | All regular expressions used to identify bot substrings in the user agent | | createIsbot | {(pattern: RegExp): (userAgent: string): boolean} | Create a custom isbot function |