
Security News
Security Community Slams MIT-linked Report Claiming AI Powers 80% of Ransomware
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.
@types/random-useragent
Advanced tools
TypeScript definitions for random-useragent
npm install --save @types/random-useragent
This package contains type definitions for random-useragent (https://github.com/skratchdot/random-useragent).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/random-useragent.
/**
 * Generated user agent object interface.
 */
export interface UserAgent {
    folder: string;
    description: string;
    userAgent: string;
    appCodename: string;
    appName: string;
    appVersion: string;
    platform: string;
    vendor: string;
    vendorSub: string;
    browserName: string;
    browserMajor: string;
    browserVersion: string;
    deviceModel: string;
    deviceType: string;
    deviceVendor: string;
    engineName: string;
    engineVersion: string;
    osName: string;
    osVersion: string;
    cpuArchitecture: string;
}
/**
 * Get a random user agent string (optionally using a filter).
 * @param [filter] - An `Array.prototype.filter()` callback function.
 */
export function getRandom(): string;
export function getRandom(filter: (value: UserAgent, index: number, array: UserAgent[]) => boolean): string | null;
/**
 * Get a random user agent's parsed data (optionally using a filter).
 * @param [filter] - An `Array.prototype.filter()` callback function.
 */
export function getRandomData(): UserAgent;
export function getRandomData(
    filter: (value: UserAgent, index: number, array: UserAgent[]) => boolean,
): UserAgent | null;
/**
 * Get an array of all the user agent strings (optionally using a filter).
 * @param [filter] - An `Array.prototype.filter()` callback function.
 */
export function getAll(filter?: (value: UserAgent, index: number, array: UserAgent[]) => boolean): string[];
/**
 * Get an array of all the parsed user agent data (optionally using a filter).
 * @param [filter] - An `Array.prototype.filter()` callback function.
 */
export function getAllData(filter?: (value: UserAgent, index: number, array: UserAgent[]) => boolean): UserAgent[];
These definitions were written by Jeffry Angtoni.
FAQs
TypeScript definitions for random-useragent
We found that @types/random-useragent demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.

Research
/Security News
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.