# subscribableevent

> A simple strongly-typed pub/sub/fire eventing system

Latest version **1.0.1** (published 2018-08-24) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2018-08-24 |
| First published | 2017-05-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 17.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 22 |
| Author | ReactXP Team |
| Maintainers | berickson1, deregtd |
| Keywords | TypeScript, Eventing, Subscribable, subscribe, publish, publish/subscribe, pub/sub, eventemitter |

## Links

- npm: https://www.npmjs.com/package/subscribableevent
- Repository: https://github.com/Microsoft/SubscribableEvent
- Homepage: https://github.com/Microsoft/SubscribableEvent#readme
- Issues: https://github.com/Microsoft/SubscribableEvent/issues
- npm.io page: https://npm.io/package/subscribableevent

## 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

- 1.0.1 (latest) — 2018-08-24
- 1.0.0 — 2017-07-19
- 0.0.2 — 2017-05-09
- 0.0.1 — 2017-05-09

## README

# SubscribableEvent

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/Microsoft/SubscribableEvent/blob/master/LICENSE) [![npm version](https://img.shields.io/npm/v/subscribableevent.svg?style=flat-square)](https://www.npmjs.com/package/subscribableevent) [![Build Status](https://img.shields.io/travis/Microsoft/SubscribableEvent/master.svg?style=flat-square)](https://travis-ci.org/Microsoft/SubscribableEvent) [![David](https://img.shields.io/david/Microsoft/SubscribableEvent.svg?style=flat-square)](https://github.com/Microsoft/SubscribableEvent) [![David](https://img.shields.io/david/dev/Microsoft/SubscribableEvent.svg?style=flat-square)](https://github.com/Microsoft/SubscribableEvent)

A simple strongly-typed pub/sub/fire eventing system

## Basic Example

```typescript
const event = new SubscribableEvent<(payload: string) => void>(); 

event.subscribe((payload: string) => {
    console.log(payload);
});

event.fire('Payload Params');
```

## Contributing

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

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