browser-which

Get the current browser. Use feature detection instead as possible.

Usage no npm install needed!

<script type="module">
  import browserWhich from 'https://cdn.skypack.dev/browser-which';
</script>

README

browser-which

Get the current browser. Use feature detection instead as possible.

Install

npm install browser-which

Usage

import browser from 'browser-which';

browser.ie // 判断是否 IE 浏览器
browser.edge // 判断是否 Edge 浏览器
browser.firefox // 判断是否 firefox 浏览器
browser.opera // 判断是否 opera 浏览器
browser.chrome // 判断是否 chrome 浏览器
browser.safari // 判断是否 safari 浏览器