Skip to content

gillstrom/is-edge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-edge Build Status

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

userAgent

Type: string

User agent to test.

version

Type: string, number

Check for specific version.

License

MIT © Andreas Gillström

About

Check if browser is Microsoft Edge

Resources

License

Stars

Watchers

Forks

Packages

No packages published