Methods
(inner) detectDeviceType() → {string}
It will return the device type
Parameters:
Type | Description |
---|---|
- Source:
Returns:
Returns the devide type.
- Type
- string
Example
const device = detectDeviceType()
// return 'Mobile' on mobile and 'Desktop' on desktop