Skip to content

dj10dj100/what_browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

npm npm npm

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