# @aphorica/vue-event-bus

> Loads and parses js file

Latest version **1.0.0** (published 2019-04-15) · MIT license · 0 weekly downloads

## Install

```sh
npm install @aphorica/vue-event-bus
pnpm add @aphorica/vue-event-bus
yarn add @aphorica/vue-event-bus
bun add @aphorica/vue-event-bus
```

## 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.0 |
| Published | 2019-04-15 |
| First published | 2019-04-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 2.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Rick Berger - Aphorica, Inc. |
| Maintainers | rickbsgu |

## Links

- npm: https://www.npmjs.com/package/@aphorica/vue-event-bus
- Repository: https://github.com/Aphorica/vue-event-bus
- Homepage: https://github.com/Aphorica/vue-event-bus#readme
- Issues: https://github.com/Aphorica/vue-event-bus/issues
- npm.io page: https://npm.io/package/@aphorica/vue-event-bus

## Recent versions

- 1.0.0 (latest) — 2019-04-15

## README

# @aphorica/vue-event-bus

## Provides Observer Pattern for VueJS

So trivial its ridiculous, but I use it everywhere and I don't want
to have to keep re-creating this file every time I need it in a new
project.

Besides, something may change

## Usage

```
  import {EventBus} from '@aphorica/vue-event-bus'

  EventBus.$on('event', handler)
  EventBus.$off('event', handler)
```

## Note

For every handler you add in a component, you should remove it,
minimally on 'beforeDestroy()' (this argues against using anonymous or arrow
functions as handlers.)

The component may not get GC'ed immediately and can still receive events,
even though it is presumably destroyed.

(Interesting debugging experience.)

---
_Source: https://npm.io/package/@aphorica/vue-event-bus · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
