Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/milanowicz/browserdetection.js
Checks for the Internet Explorer, Mobile Devices, Browser or Language.
https://github.com/milanowicz/browserdetection.js
browser browser-language browserdetection desktop ie internet-explorer mobile mobile-detection
Last synced: 29 days ago
JSON representation
Checks for the Internet Explorer, Mobile Devices, Browser or Language.
- Host: GitHub
- URL: https://github.com/milanowicz/browserdetection.js
- Owner: milanowicz
- License: mit
- Created: 2014-05-04T09:50:46.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T05:07:45.000Z (almost 2 years ago)
- Last Synced: 2024-04-14T15:47:40.619Z (8 months ago)
- Topics: browser, browser-language, browserdetection, desktop, ie, internet-explorer, mobile, mobile-detection
- Language: JavaScript
- Homepage:
- Size: 1.29 MB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# BrowserDetection.js
![Test](https://github.com/milanowicz/BrowserDetection.js/workflows/Build/badge.svg?branch=master)
[![Mutation testing](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fmilanowicz%2FBrowserDetection.js%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/milanowicz/BrowserDetection.js/master)
[![codecov](https://codecov.io/gh/milanowicz/BrowserDetection.js/branch/master/graph/badge.svg?token=42G6ETI9NV)](https://codecov.io/gh/milanowicz/BrowserDetection.js)![](https://raw.githubusercontent.com/milanowicz/BrowserDetection.js/master/.github/badge-branches.svg)
![](https://raw.githubusercontent.com/milanowicz/BrowserDetection.js/master/.github/badge-functions.svg)
![](https://raw.githubusercontent.com/milanowicz/BrowserDetection.js/master/.github/badge-lines.svg)
![](https://raw.githubusercontent.com/milanowicz/BrowserDetection.js/master/.github/badge-statements.svg)![](https://img.shields.io/node/v-lts/browser-detection.js)
![](https://img.shields.io/github/languages/top/milanowicz/BrowserDetection.js)![](https://img.shields.io/github/v/tag/milanowicz/BrowserDetection.js)
![](https://img.shields.io/github/repo-size/milanowicz/BrowserDetection.js)
![](https://img.shields.io/github/languages/code-size/milanowicz/BrowserDetection.js)![](https://img.shields.io/npm/v/browser-detection.js)
![](https://img.shields.io/npm/dt/browser-detection.js)
![](https://img.shields.io/npm/dm/browser-detection.js)
![](https://img.shields.io/npm/dy/browser-detection.js)## Usage
Install it by Yarn or NPM
```shell
> yarn add browser-detection.js
``````shell
> npm install browser-detection.js
```Sample for ES 6 usage:
```js
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.
```shell
> npm install -g grunt-cli
```Install all NodeJS Modules from Project
```shell
> yarn install
```Run tests:
```shell
> npm run tests
```#### Create release
Create a Release
```shell
> grunt
```OR
```shell
> npm run build
```