what_browser

1.0.1 • Public • Published

npm npm npm

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

Package Sidebar

Install

npm i what_browser

Weekly Downloads

0

Version

1.0.1

License

MIT

Last publish

Collaborators

  • dj10dj100