# vue-simple-browser-detect

> It is a simple vue browser detect platform.

Latest version **1.0.3** (published 2023-04-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install vue-simple-browser-detect
pnpm add vue-simple-browser-detect
yarn add vue-simple-browser-detect
bun add vue-simple-browser-detect
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.3 |
| Published | 2023-04-19 |
| First published | 2023-04-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | Ayan Ganguly |
| Maintainers | ayanganguly |
| Keywords | vue, browser-detect, vue-simple-browser-detect, simple-browser-detect, browser, detect, vue2-simple-browser-detect, vue3-simple-browser-detect |

## Links

- npm: https://www.npmjs.com/package/vue-simple-browser-detect
- Repository: https://github.com/ayanganguly/vue-simple-browser-detect
- Homepage: https://github.com/ayanganguly/vue-simple-browser-detect#readme
- Issues: https://github.com/ayanganguly/vue-simple-browser-detect/issues
- npm.io page: https://npm.io/package/vue-simple-browser-detect

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 1.0.3 (latest) — 2023-04-19
- 1.0.2 — 2023-04-19
- 1.0.1 — 2023-04-19
- 1.0.0 — 2023-04-19

## README

# Vue Simple Browser Detect

It is a simple vue browser detect platform. Available for vue2 and vue3 both

## installation
### Vue2
```sh
npm i vue-simple-browser-detect --tag=v2
```
### Vue3
```sh
npm i vue-simple-browser-detect --tag=v3
```
## Usage

```vue
#Vue 2 
// import and use in your main.js file

import Vue from 'vue'
import App from './App.vue'
import VueBrowserDetect from 'vue-simple-browser-detect'

Vue.use(VueBrowserDetect);

new Vue({
  render: h => h(App),
}).$mount('#app')

```

```vue
// use on vue components 

<template>
  <div id="app">
    Your browser is {{ $detectBrowser() }}
  </div>
</template>

<script>

export default {
  name: 'App',
  data(){
    return{
    }
  },
  mounted(){
    console.log("Browser", this.$detectBrowser())
  }
}
</script>

```

```vue
#Vue 3 
// import and use in your main.js file

import { createApp } from 'vue';
import App from './App.vue';
import VueBrowserDetect from 'vue-simple-browser-detect'

const app = createApp(App);

// Install the plugin globally
app.use(VueBrowserDetect);

app.mount('#app');
```

```vue
// use on vue components (composition api)

<template>
  <div>
    Your browser is {{ detectBrowser() }}
  </div>
</template>

<script>
import { getCurrentInstance } from 'vue'

export default {
  setup() {
    const app = getCurrentInstance();
    const detectBrowser = app.appContext.config.globalProperties.$detectBrowser;

    console.log("Browser", detectBrowser())

    return {
      detectBrowser
    };
  },
};
</script>

```
## License

[MIT](https://choosealicense.com/licenses/mit/)

---
_Source: https://npm.io/package/vue-simple-browser-detect · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
