Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Latest commit

 

History

History
272 lines (171 loc) · 6.4 KB

README.md

File metadata and controls

272 lines (171 loc) · 6.4 KB

Platform.js v1.3.6

platform

platform.os

platform

platform

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1081 "View in source") [Ⓣ][1]

The platform object.


platform.description

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1089 "View in source") [Ⓣ][1]

The platform description.


platform.layout

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1100 "View in source") [Ⓣ][1]

The name of the browser's layout engine.

The list of common layout engines include:
"Blink", "EdgeHTML", "Gecko", "Trident" and "WebKit"


platform.manufacturer

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1113 "View in source") [Ⓣ][1]

The name of the product's manufacturer.

The list of manufacturers include:
"Apple", "Archos", "Amazon", "Asus", "Barnes & Noble", "BlackBerry", "Google", "HP", "HTC", "LG", "Microsoft", "Motorola", "Nintendo", "Nokia", "Samsung" and "Sony"


platform.name

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1129 "View in source") [Ⓣ][1]

The name of the browser/environment.

The list of common browser names include:
"Chrome", "Electron", "Firefox", "Firefox for iOS", "IE", "Microsoft Edge", "PhantomJS", "Safari", "SeaMonkey", "Silk", "Opera Mini" and "Opera"

Mobile versions of some browsers have "Mobile" appended to their name:
eg. "Chrome Mobile", "Firefox Mobile", "IE Mobile" and "Opera Mobile"


platform.os

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1174 "View in source") [Ⓣ][1]

The name of the operating system.


platform.parse([ua=navigator.userAgent])

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L253 "View in source") [Ⓣ][1]

Creates a new platform object.

Arguments

  1. [ua=navigator.userAgent] (Object|string): The user agent string or context object.

Returns

(Object): A platform object.


platform.prerelease

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1137 "View in source") [Ⓣ][1]

The alpha/beta release indicator.


platform.product

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1150 "View in source") [Ⓣ][1]

The name of the product hosting the browser.

The list of common products include:

"BlackBerry", "Galaxy S4", "Lumia", "iPad", "iPod", "iPhone", "Kindle", "Kindle Fire", "Nexus", "Nook", "PlayBook", "TouchPad" and "Transformer"


platform.toString()

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L622 "View in source") [Ⓣ][1]

Returns platform.description when the platform object is coerced to a string.

Returns

(string): Returns platform.description if available, else an empty string.


platform.ua

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1158 "View in source") [Ⓣ][1]

The browser's user agent string.


platform.version

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1166 "View in source") [Ⓣ][1]

The browser/environment version.


platform.os

platform.os.architecture

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1182 "View in source") [Ⓣ][1]

The CPU architecture the OS is built for.


platform.os.family

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1195 "View in source") [Ⓣ][1]

The family of the OS.

Common values include:
"Windows", "Windows Server 2008 R2 / 7", "Windows Server 2008 / Vista", "Windows XP", "OS X", "Linux", "Ubuntu", "Debian", "Fedora", "Red Hat", "SuSE", "Android", "iOS" and "Windows Phone"


platform.os.toString()

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1211 "View in source") [Ⓣ][1]

Returns the OS string.

Returns

(string): The OS string.


platform.os.version

[Ⓢ](https://github.com/bestiejs/platform.js/blob/1.3.6/platform.js#L1203 "View in source") [Ⓣ][1]

The version of the OS.