2.0.0 • Published 8 years ago

is-edge v2.0.0

Weekly downloads
42
License
MIT
Repository
github
Last release
8 years ago

is-edge

Check if browser is Microsoft Edge

User agent sniffing is considered bad practice and should be avoided if possible.

Install

$ npm install --save is-edge

Usage

const isEdge = require('is-edge');

isEdge();

isEdge({version: 38});

isEdge({userAgent: 'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10136'});

isEdge(options)

Returns a boolean.

options

Type: object

options.userAgent

Type: string

User agent to test.

options.version

Type: string or number

Check for specific version.

License

MIT © Andreas Gillström