Giter Site home page Giter Site logo

browser-detection's Introduction

Browser Detection

A utility for detecting browser support for Braintree libs.

Example

var browserDetection = require('browser-detection');

browserDetection.isAndroid();
browserDetection.isChrome();
browserDetection.isEdge();
browserDetection.isIe();
browserDetection.isIe9();
browserDetection.isIe10();
browserDetection.isIe11();
browserDetection.isIos();
browserDetection.isIosFirefox();
browserDetection.isIosSafari();
browserDetection.isIosWebview();
browserDetection.isIosUIWebView();
browserDetection.isIosWKWebView();
browserDetection.isMobileFirefox();
browserDetection.isSamsungBrowser();
browserDetection.supportsPaymentRequestApi();
browserDetection.supportsPopups();

To reduce build sizes, you can require just the modules you need:

var isAndroid = require('browser-detection/is-android');
var isChrome = require('browser-detection/is-chrome');
var isEdge = require('browser-detection/is-edge');
var isIe = require('browser-detection/is-ie');
var isIe9 = require('browser-detection/is-ie9');
var isIe10 = require('browser-detection/is-ie10');
var isIe11 = require('browser-detection/is-ie11');
var isIos = require('browser-detection/is-ios');
var isIosFirefox = require('browser-detection/is-ios-firefox');
var isIosSafari = require('browser-detection/is-ios-safari');
var isIosWebview = require('browser-detection/is-ios-webview');
var isIosUIWebview = require('browser-detection/is-ios-uiwebview');
var isIosWKWebview = require('browser-detection/is-ios-wkwebview');
var isMobileFirefox = require('browser-detection/is-mobile-firefox');
var isSamsungBrowser = require('browser-detection/is-samsung');
var suportsPaymentRequestApi = require('browser-detection/supports-payment-request-api');
var supportsPopups = require('browser-detection/supports-popups');

Testing

npm test

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.