# pubb

> Nano pub-sub module

Latest version **0.0.1** (published 2017-04-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install pubb
pnpm add pubb
yarn add pubb
bun add pubb
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2017-04-15 |
| First published | 2017-04-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | mxmn |
| Maintainers | mxmn |
| Keywords | events, emitter, event emitter, pubsub |

## Links

- npm: https://www.npmjs.com/package/pubb
- npm.io page: https://npm.io/package/pubb

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.0.1 (latest) — 2017-04-15

## README

Import module in your project:
```js
import pubb from 'pubb'
```

Create pubb instance:
```js
const events = pubb();
```

Create functions:
```js
const func1 = str => console.log(`func1: ${str} >.<`);
const func2 = str => console.log(`func2: ${str} :D`);
```

Subscribe to your functions:
```js
const unsub1 = events.sub(func1);
const unsub2 = events.sub(func2);
```

Publish data:
```js
events.pub("foo");
```

Unsubscribe:
```js
unsub1();
```

Destroy all subscriptions:
```js
events.destroy();
```

Have fun!

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