# subscribable-lite

> Super Light weight Subscribe/Publish event system for Node.js and browser

Latest version **1.0.0** (published 2017-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install subscribable-lite
pnpm add subscribable-lite
yarn add subscribable-lite
bun add subscribable-lite
```

## 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 | 2017-10-08 |
| First published | 2016-10-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | cap32 |
| Maintainers | cap32 |

## Links

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

## Recent versions

- 1.0.0 (latest) — 2017-10-08
- 0.0.5 — 2016-12-04
- 0.0.4 — 2016-11-01
- 0.0.3 — 2016-10-25
- 0.0.2 — 2016-10-25
- 0.0.1 — 2016-10-25
- 0.0.0 — 2016-10-25

## README

# subscribable-lite

[![Build Status](https://travis-ci.org/Cap32/subscribable-lite.svg?branch=master)](https://travis-ci.org/Cap32/subscribable-lite) [![Coverage Status](https://coveralls.io/repos/github/Cap32/subscribable-lite/badge.svg?branch=master)](https://coveralls.io/github/Cap32/subscribable-lite?branch=master)

Super Light weight Subscribe/Publish event system for Node.js and browser. (UMD version only 395B after gzipped)

## Installing

Using npm:

```bash
$ npm install subscribable-lite
```

Using yarn:

```bash
$ yarn add subscribable-lite
```

## Usage

sub.subscribe(handler)

sub.publish([arg[, ...]])

```js
import SubLite from 'subscribable-lite';

const sub = new SubLite();

sub.subscribe((a, b, c) => {
    console.log(a, b, c); // => 'you are awesome'
});
sub.publish('you', 'are', 'awesome');
```

sub.unsubscribe([handler])

```js
const unsubscribe = sub.subscribe((a, b, c) => {
    console.log(a, b, c); // => 'will not trigger'
});

unsubscribe();
/* or `sub.unsubscribe();` */

sub.publish('you', 'are', 'awesome');
```

## License

MIT (c) Christopher Peng (Cap32)

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