Files
SnowLuma/.pnpm-store/v11/files/0b/c6ee5160ad593ad39c3f0c1652d53160c87cf6c6ab886e233f82a81f472ac636153399733c770864f241d173adb65f9beb4f93726aad6a5c1d1eecd647fd87
TanTan 2a69b23b47
Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Skipped
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

40 lines
1.4 KiB
Plaintext

declare function getPattern(): RegExp;
/**
* A list of bot identifiers to be used in a regular expression against user agent strings.
*/
declare const list: string[];
/**
* Check if the given user agent includes a bot pattern.
*/
declare function isbot(userAgent?: string | null): boolean;
/**
* Check if the given user agent includes a bot pattern. Naive implementation (less accurate).
*/
declare const isbotNaive: typeof isbot;
/**
* Create a custom isbot function with a custom pattern.
*/
declare const createIsbot: (customPattern: RegExp) => typeof isbot;
/**
* Create a custom isbot function with a custom pattern.
*/
declare const createIsbotFromList: (list: string[]) => typeof isbot;
/**
* Find the first part of the user agent that matches a bot pattern.
*/
declare const isbotMatch: (userAgent: Parameters<typeof isbot>[0]) => string | null;
/**
* Find all parts of the user agent that match a bot pattern.
*/
declare const isbotMatches: (userAgent: Parameters<typeof isbot>[0]) => string[];
/**
* Find the first bot pattern that match the given user agent.
*/
declare const isbotPattern: (userAgent: Parameters<typeof isbot>[0]) => string | null;
/**
* Find all bot patterns that match the given user agent.
*/
declare const isbotPatterns: (userAgent: Parameters<typeof isbot>[0]) => string[];
export { createIsbot, createIsbotFromList, getPattern, isbot, isbotMatch, isbotMatches, isbotNaive, isbotPattern, isbotPatterns, list };