@types/ua-parser-js

  • Version 0.7.39
  • Published
  • 8.83 kB
  • No dependencies
  • MIT license

Install

npm i @types/ua-parser-js
yarn add @types/ua-parser-js
pnpm add @types/ua-parser-js

Overview

TypeScript definitions for ua-parser-js

Index

Variables

variable UAParser

const UAParser: {
(uastring?: string, extensions?: Record<string, unknown>): UAParser.IResult;
(extensions?: Record<string, unknown>): UAParser.IResult;
new (
uastring?: string,
extensions?: Record<string, unknown>
): UAParser.UAParserInstance;
new (extensions?: Record<string, unknown>): UAParser.UAParserInstance;
VERSION: string;
BROWSER: UAParser.BROWSER;
CPU: UAParser.CPU;
DEVICE: UAParser.DEVICE;
ENGINE: UAParser.ENGINE;
OS: UAParser.OS;
UAParser: typeof UAParser;
};

    Interfaces

    interface BROWSER

    interface BROWSER {}

      property MAJOR

      MAJOR: 'major';
      • Deprecated

      property NAME

      NAME: 'name';

        property VERSION

        VERSION: 'version';

          interface CPU

          interface CPU {}

            property ARCHITECTURE

            ARCHITECTURE: 'architecture';

              interface DEVICE

              interface DEVICE {}

                property CONSOLE

                CONSOLE: 'console';

                  property EMBEDDED

                  EMBEDDED: 'embedded';

                    property MOBILE

                    MOBILE: 'mobile';

                      property MODEL

                      MODEL: 'model';

                        property SMARTTV

                        SMARTTV: 'smarttv';

                          property TABLET

                          TABLET: 'tablet';

                            property TYPE

                            TYPE: 'type';

                              property VENDOR

                              VENDOR: 'vendor';

                                property WEARABLE

                                WEARABLE: 'wearable';

                                  interface ENGINE

                                  interface ENGINE {}

                                    property NAME

                                    NAME: 'name';

                                      property VERSION

                                      VERSION: 'version';

                                        interface IBrowser

                                        interface IBrowser {}

                                          property major

                                          major: string | undefined;
                                          • Determined dynamically

                                            Deprecated

                                          property name

                                          name: string | undefined;
                                          • Possible values : Amaya, Android Browser, Arora, Avant, Baidu, Blazer, Bolt, Camino, Chimera, Chrome, Chromium, Comodo Dragon, Conkeror, Dillo, Dolphin, Doris, Edge, Epiphany, Fennec, Firebird, Firefox, Flock, GoBrowser, iCab, ICE Browser, IceApe, IceCat, IceDragon, Iceweasel, IE [Mobile], Iron, Jasmine, K-Meleon, Konqueror, Kindle, Links, Lunascape, Lynx, Maemo, Maxthon, Midori, Minimo, MIUI Browser, [Mobile] Safari, Mosaic, Mozilla, Netfront, Netscape, NetSurf, Nokia, OmniWeb, Opera [Mini/Mobi/Tablet], Phoenix, Polaris, QQBrowser, RockMelt, Silk, Skyfire, SeaMonkey, SlimBrowser, Swiftfox, Tizen, UCBrowser, Vivaldi, w3m, Yandex

                                          property version

                                          version: string | undefined;
                                          • Determined dynamically

                                          interface ICPU

                                          interface ICPU {}

                                            property architecture

                                            architecture: string | undefined;
                                            • Possible architecture: 68k, amd64, arm, arm64, avr, ia32, ia64, irix, irix64, mips, mips64, pa-risc, ppc, sparc, sparc64

                                            interface IDevice

                                            interface IDevice {}

                                              property model

                                              model: string | undefined;
                                              • Determined dynamically

                                              property type

                                              type: string | undefined;
                                              • Possible type: console, mobile, tablet, smarttv, wearable, embedded

                                              property vendor

                                              vendor: string | undefined;
                                              • Possible vendor: Acer, Alcatel, Amazon, Apple, Archos, Asus, BenQ, BlackBerry, Dell, GeeksPhone, Google, HP, HTC, Huawei, Jolla, Lenovo, LG, Meizu, Microsoft, Motorola, Nexian, Nintendo, Nokia, Nvidia, Ouya, Palm, Panasonic, Polytron, RIM, Samsung, Sharp, Siemens, Sony-Ericsson, Sprint, Xbox, ZTE

                                              interface IEngine

                                              interface IEngine {}

                                                property name

                                                name: string | undefined;
                                                • Possible name: Amaya, EdgeHTML, Gecko, iCab, KHTML, Links, Lynx, NetFront, NetSurf, Presto, Tasman, Trident, w3m, WebKit

                                                property version

                                                version: string | undefined;
                                                • Determined dynamically

                                                interface IOS

                                                interface IOS {}

                                                  property name

                                                  name: string | undefined;
                                                  • Possible 'os.name' AIX, Amiga OS, Android, Arch, Bada, BeOS, BlackBerry, CentOS, Chromium OS, Contiki, Fedora, Firefox OS, FreeBSD, Debian, DragonFly, Gentoo, GNU, Haiku, Hurd, iOS, Joli, Linpus, Linux, Mac OS, Mageia, Mandriva, MeeGo, Minix, Mint, Morph OS, NetBSD, Nintendo, OpenBSD, OpenVMS, OS/2, Palm, PCLinuxOS, Plan9, Playstation, QNX, RedHat, RIM Tablet OS, RISC OS, Sailfish, Series40, Slackware, Solaris, SUSE, Symbian, Tizen, Ubuntu, UNIX, VectorLinux, WebOS, Windows [Phone/Mobile], Zenwalk

                                                  property version

                                                  version: string | undefined;
                                                  • Determined dynamically

                                                  interface IResult

                                                  interface IResult {}

                                                    property browser

                                                    browser: IBrowser;

                                                      property cpu

                                                      cpu: ICPU;

                                                        property device

                                                        device: IDevice;

                                                          property engine

                                                          engine: IEngine;

                                                            property os

                                                            os: IOS;

                                                              property ua

                                                              ua: string;

                                                                interface OS

                                                                interface OS {}

                                                                  property NAME

                                                                  NAME: 'name';

                                                                    property VERSION

                                                                    VERSION: 'version';

                                                                      interface UAParserInstance

                                                                      interface UAParserInstance {}

                                                                        method getBrowser

                                                                        getBrowser: () => IBrowser;
                                                                        • Returns browser information

                                                                        method getCPU

                                                                        getCPU: () => ICPU;
                                                                        • Returns parsed CPU information

                                                                        method getDevice

                                                                        getDevice: () => IDevice;
                                                                        • Returns device information

                                                                        method getEngine

                                                                        getEngine: () => IEngine;
                                                                        • Returns browsers engine information

                                                                        method getOS

                                                                        getOS: () => IOS;
                                                                        • Returns OS information

                                                                        method getResult

                                                                        getResult: () => IResult;
                                                                        • Returns parse result

                                                                        method getUA

                                                                        getUA: () => string;
                                                                        • Returns UA string of current instance

                                                                        method setUA

                                                                        setUA: (uastring: string) => UAParserInstance;
                                                                        • Set & parse UA string

                                                                        Type Aliases

                                                                        type UAParser

                                                                        type UAParser = UAParser.UAParserInstance;

                                                                          Package Files (1)

                                                                          Dependencies (0)

                                                                          No dependencies.

                                                                          Dev Dependencies (0)

                                                                          No dev dependencies.

                                                                          Peer Dependencies (0)

                                                                          No peer dependencies.

                                                                          Badge

                                                                          To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                                          You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/ua-parser-js.

                                                                          • Markdown
                                                                            [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/ua-parser-js)
                                                                          • HTML
                                                                            <a href="https://www.jsdocs.io/package/@types/ua-parser-js"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>