Socket
Socket
Sign inDemoInstall

browser-detection.js

Package Overview
Dependencies
0
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    browser-detection.js

JavaScript Detection for Mobile Devices, Internet Explorer, Browser UserAgents and Language.


Version published
Weekly downloads
2
Maintainers
1
Created
Weekly downloads
 

Readme

Source

BrowserDetection.js

Test Mutation testing codecov

Usage

Install it by Yarn or NPM

> yarn add browser-detection.js
> npm install browser-detection.js

Sample for ES 6 usage:

import BrowserDetection from 'browser-detection.js/src/BrowserDetection';
const detection = new BrowserDetection(
    window,
    navigator.userAgent || navigator.vendor || window.opera || '',
    navigator.appName || ''
);

When ES 5 or what ever, then use one of them:

browser-detection.js/src/BrowserDetection.js
browser-detection.js/src/BrowserDetection.min.js

Description

This Plug-In checks the following browser features:

  • Check if an Browser the Internet Explorer and which version from it.

  • Check if mobile or desktop Device is.

    • Android
    • Apple
    • BlackBerry
    • iOS
    • Linux
    • Opera
    • Windows
  • Check for the Browser Type if it an IE, Chrome, Firefox, Opera and Safari.

    • Chrome
    • Firefox
    • Opera
    • Safari
  • Check the Browser language.

Get Started

Contributions are welcome to join the project.

When you're not a developer, then create an issue for your wish feature instead.

GruntJS

Install GruntJS command line interface at the first time when you never used it before.

> npm install -g grunt-cli

Install all NodeJS Modules from Project

> yarn install

Run tests:

> npm run tests
Create release

Create a Release

> grunt

OR

> npm run build

Keywords

FAQs

Last updated on 03 Mar 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc