Recognise bots/crawlers/spiders using the user agent string.
82
Provide utilities that surface the dependency's compiled bot-detection pattern and the underlying identifier list, along with a simple inspector for user agent strings.
includeIdentifiers: false, the regex source is still returned and the identifiers array is empty. @testmatched: true, includes the matched fragment "Googlebot", and echoes the pattern source used. @testmatched: false with an empty fragments list. @test@generates
export function loadDetectionMetadata(options?: { includeIdentifiers?: boolean }): {
regexSource: string;
identifiers: string[];
};
export function inspectAgent(userAgent: string): {
matched: boolean;
matchFragments: string[];
patternSource: string;
};Bot user-agent detection library providing compiled regex and curated identifier list.
Install with Tessl CLI
npx tessl i tessl/npm-isbot