UNPKG

@imaginerlabs/user-agent-generator

Version:

High-performance, configurable, batch-generating User-Agent spoofing library. Supports multiple browsers, devices, and returns detailed meta information. Perfect for web scraping, automated testing, proxy pools and more.

18 lines (17 loc) 883 B
/** * User-Agent Generator Module * User-Agent 生成器模块 * * This module provides functionality to generate realistic User-Agent strings * for different browsers, operating systems, and devices. * 该模块提供生成不同浏览器、操作系统和设备的真实 User-Agent 字符串的功能。 */ import { GenerateUserAgentOptions, UserAgentWithMeta } from './types'; /** * Generate User-Agent string or structured object * 生成 User-Agent 字符串或结构化对象 * * @param options Generation parameters (browser, device, count, withMeta) / 生成参数(浏览器、设备、数量、是否包含元数据) * @returns Single UA string/object, or array of UAs / 单个 UA 字符串/对象,或 UA 数组 */ export declare function generateUserAgent(options?: GenerateUserAgentOptions): string | UserAgentWithMeta | (string | UserAgentWithMeta)[];