General API
device()
Detects the type of device being used.
- Returns the type of device being used as a string: "desktop", "tablet", "mobile".
Example:
device();
// 'desktop' | 'tablet' | 'mobile'
device();
// 'desktop' | 'tablet' | 'mobile'