Provides UserAgent and related types to be able to provide a
structured understanding of a user agent string.
Classes
A representation of user agent string, which can be used to determine environmental information represented by the string. All properties are determined lazily.
- browser(): Browser
The name and version of the browser extracted from the user agent string.
- cpu(): Cpu
The architecture of the CPU extracted from the user agent string.
- device(): Device
The model, type, and vendor of a device if present in a user agent string.
- engine(): Engine
The name and version of the browser engine in a user agent string.
- os(): Os
The name and version of the operating system in a user agent string.
- toJSON(): { browser: Browser; cpu: Cpu; device: Device; engine: Engine; os: Os; ua: string; }
Converts the current instance to a JSON representation.
- toString(): string
Converts the current instance to a string.
- ua(): string
A read only version of the user agent string related to the instance.
Interfaces
The browser as described by a user agent string.
The CPU information as described by a user agent string.
- architecture: string | undefined
The CPU architecture.
The device as described by a user agent string.
The browser engine as described by a user agent string.