Ctrl + K
DocumentationLog inGet started

tessl/npm-isbot

tessl install tessl/npm-isbot@5.1.0

Recognise bots/crawlers/spiders using the user agent string.

Agent Success

Agent success rate when using this tile

82%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.94x

Baseline

Agent success rate without this tile

87%

task.mdevals/scenario-2/

Bot Pattern Explorer

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.

Capabilities

Detection metadata

  • Requesting detection metadata returns the dependency's compiled bot-detection regex source and a non-empty identifier list that includes "googlebot". @test
  • When identifiers are disabled via includeIdentifiers: false, the regex source is still returned and the identifiers array is empty. @test

Agent inspection

  • Inspecting the Googlebot user agent returns matched: true, includes the matched fragment "Googlebot", and echoes the pattern source used. @test
  • Inspecting a normal desktop Chrome user agent returns matched: false with an empty fragments list. @test

Implementation

@generates

API

export function loadDetectionMetadata(options?: { includeIdentifiers?: boolean }): {
  regexSource: string;
  identifiers: string[];
};

export function inspectAgent(userAgent: string): {
  matched: boolean;
  matchFragments: string[];
  patternSource: string;
};

Dependencies { .dependencies }

isbot { .dependency }

Bot user-agent detection library providing compiled regex and curated identifier list.

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/isbot@5.1.x
tile.json