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.

32 lines (31 loc) 848 B
"use strict"; /** * User-Agent Meta Information Builder * User-Agent 元信息构建器 * * This module is responsible for building structured meta information * for User-Agent strings. * 该模块负责为 User-Agent 字符串构建结构化的元信息。 */ Object.defineProperty(exports, "__esModule", { value: true }); exports.buildMeta = buildMeta; /** * Build User-Agent meta information structure * 构建 User-Agent 元信息结构 * * @param params Build parameters / 构建参数 * @returns UserAgentMeta structure / UserAgentMeta 结构 */ function buildMeta(params) { return { browser: { name: params.browser, version: params.browserVersion, }, os: { name: params.os, version: params.osVersion, }, device: params.device, }; }