what_browser
v1.0.1
Published
Module for detecting which browser the current user has, and if it's mobile or touch enabled
Downloads
4
Maintainers
Readme
WhatBrowser.js
Ever wanted to know what the current Browser is being used in Javascript?
This module helps you to understand what the device and browser the current session is using.
install
npm
npm install what_browser
yarn
yarn add what_browser
What Browser am I using?
A js module that returns information about the current users browser.
import what from 'what_browser';
Browser information
returns device type and version
what.Browser.isThis(function(device,version) {
console.log(device, version)
});
If the Browser is Touch Enabled:
what.device.isTouchDevice()
If the Browser is desktop:
what.device.isDesktop()
If the Browser is Tablet :
what.device.isTablet()
If the Browser is Mobile :
what.device.isMobile()
Device Detection
Specific Mobile operating systems
//Android
what.device._android()
//BlackBerry
what.device._blackBerry()
//iOS
what.device._ios(),
Specific models
iPhone
what.device._iPhone()
iPad
what.device._iPad()
iPod
what.device._iPod()
Opera Mobile
what.device._opera()
Windows Phone
what.device._windows()
Any comments, or questions grab me on twitter @dj10dj100