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
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.
Contributions are welcome to join the project.
When you're not a developer, then create an issue for your wish feature instead.
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 a Release
> grunt
OR
> npm run build