ngx-device-detector
- Version 10.1.0
- Published
- 160 kB
- 1 dependency
- MIT license
Install
npm i ngx-device-detector
yarn add ngx-device-detector
pnpm add ngx-device-detector
Overview
<p align="center"> <img src="https://raw.githubusercontent.com/AhsanAyaz/ngx-device-detector/master/assets/logo.svg" width="200"> </p>
Index
Variables
Classes
Interfaces
Enums
Variables
variable BROWSER_VERSIONS_RE
const BROWSER_VERSIONS_RE: any;
variable BROWSER_VERSIONS_RE_MAP
const BROWSER_VERSIONS_RE_MAP: any;
variable BROWSERS
const BROWSERS: { CHROME: string; FIREFOX: string; SAFARI: string; OPERA: string; IE: string; MS_EDGE: string; MS_EDGE_CHROMIUM: string; FB_MESSANGER: string; SAMSUNG: string; UCBROWSER: string; UNKNOWN: string;};
variable BROWSERS_RE
const BROWSERS_RE: any;
variable DESKTOP_DEVICES
const DESKTOP_DEVICES: string[];
variable DEVICES
const DEVICES: { BLACKBERRY: string; FIREFOX_OS: string; CHROME_BOOK: string; WINDOWS_PHONE: string; VITA: string; PS4: string; MAC: string; CHROMECAST: string; APPLE_TV: string; GOOGLE_TV: string; ANDROID: string; Tesla: string; iPad: string; IPHONE: string; iPod: string; UNKNOWN: string; HTC: string; NEXUS_PHONE: string; NexusTablet: string; DELL: string; MOTOROLA: string; SAMSUNG: string; LG: string; SONY: string; ASUS: string; NOKIA_LUMIA: string; MICROMAX: string; PALM: string; VERTU: string; PANTECH: string; FLY: string; WIKO: string; I_MOBILE: string; SIMVALLEY: string; WOLFGANG: string; ALCATEL: string; HONEYWELL: string; NINTENDO: string; AMOI: string; INQ: string; GENERIC_PHONE: string; MI_SE_9: string;};
variable DEVICES_RE
const DEVICES_RE: any;
variable GENERAL
const GENERAL: { UKNOWN: string };
Created by ahsanayaz on 08/11/2016.
variable MOBILES_RE
const MOBILES_RE: { HTC: RegExp; NEXUS_PHONE: RegExp; DELL: RegExp; MOTOROLA: RegExp; SAMSUNG: RegExp; LG: RegExp; SONY: RegExp; ASUS: RegExp; NOKIA_LUMIA: RegExp; MICROMAX: RegExp; PALM: RegExp; VERTU: RegExp; PANTECH: RegExp; FLY: RegExp; WIKO: RegExp; I_MOBILE: RegExp; SIMVALLEY: RegExp; WOLFGANG: RegExp; ALCATEL: RegExp; NINTENDO: RegExp; AMOI: RegExp; INQ: RegExp; VITA: RegExp; BLACKBERRY: RegExp; FIREFOX_OS: RegExp; IPHONE: RegExp; iPod: RegExp; ANDROID: RegExp; WINDOWS_PHONE: RegExp; GENERIC_PHONE: RegExp;};
variable OS
const OS: { WINDOWS: string; MAC: string; IOS: string; ANDROID: string; LINUX: string; UNIX: string; FIREFOX_OS: string; CHROME_OS: string; WINDOWS_PHONE: string; UNKNOWN: string;};
variable OS_RE
const OS_RE: any;
variable OS_VERSIONS
const OS_VERSIONS: any;
variable OS_VERSIONS_RE
const OS_VERSIONS_RE: any;
variable OS_VERSIONS_RE_MAP
const OS_VERSIONS_RE_MAP: any;
variable TABLETS_RE
const TABLETS_RE: { iPad: RegExp; NexusTablet: RegExp; GoogleTablet: RegExp; SamsungTablet: RegExp; Kindle: RegExp; SurfaceTablet: RegExp; HPTablet: RegExp; AsusTablet: RegExp; BlackBerryTablet: RegExp; HTCtablet: RegExp; MotorolaTablet: RegExp; NookTablet: RegExp; AcerTablet: RegExp; ToshibaTablet: RegExp; LGTablet: RegExp; FujitsuTablet: RegExp; PrestigioTablet: RegExp; LenovoTablet: RegExp; DellTablet: RegExp; YarvikTablet: RegExp; MedionTablet: RegExp; ArnovaTablet: RegExp; IntensoTablet: RegExp; IRUTablet: RegExp; MegafonTablet: RegExp; EbodaTablet: RegExp; AllViewTablet: RegExp; ArchosTablet: RegExp; AinolTablet: RegExp; NokiaLumiaTablet: RegExp; SonyTablet: RegExp; PhilipsTablet: RegExp; CubeTablet: RegExp; CobyTablet: RegExp; MIDTablet: RegExp; MSITablet: RegExp; SMiTTablet: RegExp; RockChipTablet: RegExp; FlyTablet: RegExp; bqTablet: RegExp; HuaweiTablet: RegExp; NecTablet: RegExp; PantechTablet: RegExp; BronchoTablet: RegExp; VersusTablet: RegExp; ZyncTablet: RegExp; PositivoTablet: RegExp; NabiTablet: RegExp; KoboTablet: RegExp; DanewTablet: RegExp; TexetTablet: RegExp; PlaystationTablet: RegExp; TrekstorTablet: RegExp; PyleAudioTablet: RegExp; AdvanTablet: RegExp; DanyTechTablet: string; GalapadTablet: RegExp; MicromaxTablet: RegExp; KarbonnTablet: RegExp; AllFineTablet: RegExp; PROSCANTablet: RegExp; YONESTablet: RegExp; ChangJiaTablet: RegExp; GUTablet: RegExp; PointOfViewTablet: RegExp; OvermaxTablet: RegExp; HCLTablet: RegExp; DPSTablet: RegExp; VistureTablet: RegExp; CrestaTablet: RegExp; MediatekTablet: RegExp; ConcordeTablet: RegExp; GoCleverTablet: RegExp; ModecomTablet: RegExp; VoninoTablet: RegExp; ECSTablet: RegExp; StorexTablet: RegExp; VodafoneTablet: RegExp; EssentielBTablet: RegExp; RossMoorTablet: RegExp; iMobileTablet: RegExp; TolinoTablet: RegExp; AudioSonicTablet: RegExp; AMPETablet: RegExp; SkkTablet: RegExp; TecnoTablet: RegExp; JXDTablet: RegExp; iJoyTablet: RegExp; FX2Tablet: RegExp; XoroTablet: RegExp; ViewsonicTablet: RegExp; VerizonTablet: RegExp; OdysTablet: RegExp; CaptivaTablet: RegExp; IconbitTablet: RegExp; TeclastTablet: RegExp; OndaTablet: RegExp; JaytechTablet: RegExp; BlaupunktTablet: RegExp; DigmaTablet: RegExp; EvolioTablet: RegExp; LavaTablet: RegExp; AocTablet: RegExp; MpmanTablet: RegExp; CelkonTablet: RegExp; WolderTablet: RegExp; MediacomTablet: string; MiTablet: RegExp; NibiruTablet: RegExp; NexoTablet: RegExp; LeaderTablet: RegExp; UbislateTablet: RegExp; PocketBookTablet: RegExp; KocasoTablet: RegExp; HisenseTablet: RegExp; Hudl: RegExp; TelstraTablet: RegExp; Honeywell: RegExp; GenericTablet: RegExp;};
Classes
class DeviceDetectorService
class DeviceDetectorService {}
constructor
constructor(platformId: any);
property browser
browser: string;
property browser_version
browser_version: string;
property device
device: string;
property deviceType
deviceType: string;
property isDesktopMode
isDesktopMode: boolean;
property orientation
orientation: string;
property os
os: string;
property os_version
os_version: string;
property ɵfac
static ɵfac: i0.ɵɵFactoryDeclaration<DeviceDetectorService, never>;
property ɵprov
static ɵprov: i0.ɵɵInjectableDeclaration<DeviceDetectorService>;
property reTree
reTree: ReTree;
property ua
ua: string;
property userAgent
userAgent: string;
method getDeviceInfo
getDeviceInfo: () => DeviceInfo;
Ahsan Ayaz Returns the device information
Returns
the device information object.
method isDesktop
isDesktop: (userAgent?: string) => boolean;
Ahsan Ayaz Compares the current device info with the desktop devices to check if the current device is a desktop device.
Returns
whether the current device is a desktop device
method isDesktopModeEnabled
isDesktopModeEnabled: () => boolean;
Checks if the current device is a mobile device running in desktop mode. Desktop mode occurs when mobile browsers request desktop websites by sending desktop user agent strings while retaining mobile hardware characteristics.
Returns
whether the current device is in desktop mode
method isMobile
isMobile: (userAgent?: string) => boolean;
Ahsan Ayaz Compares the current device info with the mobile devices to check if the current device is a mobile and also check current device is tablet so it will return false.
Returns
whether the current device is a mobile
method isTablet
isTablet: (userAgent?: string) => boolean;
Ahsan Ayaz Compares the current device info with the tablet devices to check if the current device is a tablet.
Returns
whether the current device is a tablet
method setDeviceInfo
setDeviceInfo: (ua?: string) => void;
class ReTree
class ReTree {}
Created by ahsanayaz on 08/11/2016.
constructor
constructor();
method exec
exec: (str: string, regex: any) => any;
method test
test: (str: string, regex: any) => any;
Interfaces
interface DeviceInfo
interface DeviceInfo {}
property browser
browser: string;
property browser_version
browser_version: string;
property device
device: string;
property deviceType
deviceType: string;
property isDesktopMode
isDesktopMode: boolean;
property orientation
orientation: string;
property os
os: string;
property os_version
os_version: string;
property userAgent
userAgent: string;
Enums
enum DeviceType
enum DeviceType { Mobile = 'mobile', Tablet = 'tablet', Desktop = 'desktop', Unknown = 'unknown',}
enum OrientationType
enum OrientationType { Portrait = 'portrait', Landscape = 'landscape',}
Package Files (1)
Dependencies (1)
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (2)
Badge
To add a badge like this oneto 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/ngx-device-detector
.
- Markdown[](https://www.jsdocs.io/package/ngx-device-detector)
- HTML<a href="https://www.jsdocs.io/package/ngx-device-detector"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 4387 ms. - Missing or incorrect documentation? Open an issue for this package.