Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue3-detect-browser

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue3-detect-browser

Plugin for Vue3 (Option API and Composition API) that detects browser name, version, and user-agent

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
49
decreased by-2%
Maintainers
1
Weekly downloads
 
Created
Source

vue3-detect-browser

Plugin (with TypeScript support) for Vue3 that detects browser name, version, and user-agent. This is a fork of https://github.com/smg99/vue-detect-browser.

Installation with npm

npm i vue3-detect-browser

Installation with yarn

yarn add vue3-detect-browser

Option API Usage

In your main.js:

import detectBrowser from "vue-detect-browser";
app.use(detectBrowser);

Browser

In any component file it is available as this.detectBrowser data property

this.detectBrowser.isChrome
this.detectBrowser.isFirefox
this.detectBrowser.isOpera
this.detectBrowser.isSafari
this.detectBrowser.isEdge
this.detectBrowser.isChromeIOS
this.detectBrowser.isIOS
this.detectBrowser.isIE

Composition API Usage

<script setup>
import { useBrowserDetect } from 'vue3-detect-browser';
const { isFirefox, isChrome } = useBrowserDetect();
</script>

Keywords

FAQs

Package last updated on 26 Feb 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc