-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrm.hbs
55 lines (37 loc) · 1.81 KB
/
rm.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
[](https://www.npmjs.org/package/@uttori/event-dispatcher)
[](https://www.npmjs.org/package/@uttori/event-dispatcher)
[](https://travis-ci.com/uttori/uttori-event-dispatcher)
[](https://coveralls.io/github/uttori/uttori-event-dispatcher?branch=master)
[](https://bundlephobia.com/result?p=@uttori/event-dispatcher)
[](https://bundlephobia.com/result?p=@uttori/event-dispatcher)
[](https://bundlephobia.com/result?p=@uttori/event-dispatcher)
[](https://bundlephobia.com/result?p=@uttori/event-dispatcher)
# Uttori Event Dispatcher
An event bus system for registering, unregistering and triggering events.
## Install
```bash
npm install --save @uttori/event-dispatcher
```
* * *
# Example
```js
const hooks = new EventDispatcher();
hooks.on('update', callback);
hooks.dispatch('update', { data }, this);
hooks.off('update', callback);
```
# API Reference
{{>main}}
* * *
## Tests
To run the test suite, first install the dependencies, then run `npm test`:
```bash
npm install
npm test
DEBUG=Uttori* npm test
```
## Contributors
* [Matthew Callis](https://github.com/MatthewCallis)
* [You](https://github.com/YOU)
## License
* [MIT](LICENSE)