Skip to content

API Cheat Sheet [bom5]

bapquad edited this page Feb 26, 2022 · 3 revisions

Manipulating with BOM elements.

For using this module, we need to import the bom5 module into your application. Like as following line.

import {bom5} from '@bapquad/element5'

Browser model class

Manages the browser model.

IsFirefox

Receives the boolean value tests whether the browser is firefox or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Browser.IsFirefox) 
{
  console.log("The browser is Firefox");
}
else 
{
  console.log("The browser isn't Firefox");
}

IsOpera

Receives the boolean value tests whether the browser is opera or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Browser.IsOpera) 
{
  console.log("The browser is Opera");
}
else 
{
  console.log("The browser isn't Opera");
}

IsSafari

Receives the boolean value tests whether the browser is Safari or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Browser.IsSafari) 
{
  console.log("The browser is Safari");
}
else 
{
  console.log("The browser isn't Safari");
}

IsIE

Receives the boolean value tests whether the browser is Internet Explorer or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Browser.IsIE) 
{
  console.log("The browser is Internet Explorer");
}
else 
{
  console.log("The browser isn't Internet Explorer");
}

IsEdge

Receives the boolean value tests whether the browser is Microsoft Edge or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Browser.IsEdge) 
{
  console.log("The browser is Microsoft Edge");
}
else 
{
  console.log("The browser isn't Microsoft Edge");
}

IsChrome

Receives the boolean value tests whether the browser is Google Chrome or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Browser.IsChrome) 
{
  console.log("The browser is Google Chrome");
}
else 
{
  console.log("The browser isn't Google Chrome");
}

IsBlink

Receives the boolean value tests whether the browser is blink browser or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Browser.IsBlink) 
{
  console.log("The browser is blink browser");
}
else 
{
  console.log("The browser isn't blink browser");
}

IsOperaMini

Receives the boolean value tests whether the browser is Opera Mini or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Browser.IsOperaMini) 
{
  console.log("The browser is Opera Mini");
}
else 
{
  console.log("The browser isn't Opera Mini");
}

Device model class

Manages the device model.

IsWin

Receives the boolean value tests whether the device is Microsoft Windows or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsWin) 
{
  console.log("The device is Microsoft Windows");
}
else 
{
  console.log("The device isn't Microsoft Windows");
}

IsMac

Receives the boolean value tests whether the device is Apple Mac or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsMac) 
{
  console.log("The device is Apple Mac device");
}
else 
{
  console.log("The device isn't Apple Mac device");
}

IsUnix

Receives the boolean value tests whether the device is Unix operation system or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsUnix) 
{
  console.log("The device is Unix operation system");
}
else 
{
  console.log("The device isn't Unix operation system");
}

IsLinux

Receives the boolean value tests whether the device is Linux or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsLinux) 
{
  console.log("The device is Linux");
}
else 
{
  console.log("The device isn't Linux");
}

Is64BitsArch

Receives the boolean value tests whether the device is 64-bits architecture or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.Is64BitsArch) 
{
  console.log("The device is 64-bits architecture");
}
else 
{
  console.log("The device isn't 64-bits architecture");
}

Is32BitsArch

Receives the boolean value tests whether the device is 32-bits architecture or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.Is32BitsArch) 
{
  console.log("The device is 32-bits architecture");
}
else 
{
  console.log("The device isn't 32-bits architecture");
}

IsAndroid

Receives the boolean value tests whether the device is Android or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsAndroid) 
{
  console.log("The device is Android");
}
else 
{
  console.log("The device isn't Android");
}

IsiOS

Receives the boolean value tests whether the device is iOS or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsiOS) 
{
  console.log("The device is iOS");
}
else 
{
  console.log("The device isn't iOS");
}

IsWP

Receives the boolean value tests whether the device is Windows Phone or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsWP) 
{
  console.log("The device is Windows Phone");
}
else 
{
  console.log("The device isn't Windows Phone");
}

IsBlackBerry

Receives the boolean value tests whether the device is BlackBerry or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsBlackBerry) 
{
  console.log("The device is BlackBerry");
}
else 
{
  console.log("The device isn't BlackBerry");
}

IsiPhone

Receives the boolean value tests whether the device is iPhone or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsiPhone) 
{
  console.log("The device is iPhone");
}
else 
{
  console.log("The device isn't iPhone");
}

IsiPad

Receives the boolean value tests whether the device is iPad or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsiPad) 
{
  console.log("The device is iPad");
}
else 
{
  console.log("The device isn't iPad");
}

IsiPod

Receives the boolean value tests whether the device is iPod or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsiPod) 
{
  console.log("The device is iPod");
}
else 
{
  console.log("The device isn't is iPod");
}

IsWebOS

Receives the boolean value tests whether the device is isWebOS or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsWebOS) 
{
  console.log("The device is webOS");
}
else 
{
  console.log("The device isn't webOS");
}

IsTablet

Receives the boolean value tests whether the device is tablet or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsTablet) 
{
  console.log("The device is tablet");
}
else 
{
  console.log("The device isn't tablet");
}

IsMobile

Receives the boolean value tests whether the device is mobile or not.

Value

A Boolean value.

Example

import {bom5} from '@bapquad/element5'

if(bom5.Device.IsMobile) 
{
  console.log("The device is mobile");
}
else 
{
  console.log("The device isn't mobile");
}