Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adi518/detect-ie
https://github.com/adi518/detect-ie
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/adi518/detect-ie
- Owner: adi518
- Created: 2018-02-15T21:18:57.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-11-19T22:24:02.000Z (about 6 years ago)
- Last Synced: 2024-12-06T09:18:25.131Z (17 days ago)
- Language: JavaScript
- Homepage:
- Size: 521 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Detect-Ie
Detection of Internet Explorer 7-11 and Edge (>= 12), based on either Feature or User-Agent. See [demo](https://adi518.github.io/detect-ie/).
## Install
```
npm install --save detect-msie
```
## Usage
Default detection is based on Feature, as it is a more reliable method. To use a User-Agent based detection instead, see options below.
```js
import { detectIe } from 'detect-msie'const report = detectIe()
// Available Queries:
console.log(report.isDetected)
console.log(report.isEdge)
console.log(report.isBelowEdge)
console.log(report.isIe7OrLower)
console.log(report.isIe7)
console.log(report.isIe8)
console.log(report.isIe9)
console.log(report.isIe10)
console.log(report.isIe11)
console.log(report.version)
```
## Options
#### `useUserAgent`
* Type: `Boolean`
* Default: `false`
* Description: Use User-Agent based detection instead (less reliable, [spoofable](https://developer.mozilla.org/en-US/docs/Glossary/User_agent)).