Skip to content

Commit cc0a54d

Browse files
authored
Update README.md
1 parent 07dd65c commit cc0a54d

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
Small package for easy use of custom events in js.
44

5+
# Installation
6+
7+
Run `npm i js-events-dispatcher` and use `import BindableObject from 'js-events-dispatcher'`.
8+
59
# Documentation
610

711
All available methods has JSDoc block even with `@example`.
@@ -36,7 +40,7 @@ When you bind a handler to mass event, first handler will not be removed.
3640
Also, the call of all handlers occurs sequentially relative to when they were bound.
3741

3842
```
39-
import BindableObject from 'js-events';
43+
import BindableObject from 'js-events-dispatcher';
4044
4145
class YourClass {
4246
//#region Bindable
@@ -91,7 +95,7 @@ class YourClass {
9195
# Extending classes with events
9296

9397
```
94-
import BindableObject from 'js-events';
98+
import BindableObject from 'js-events-dispatcher';
9599
96100
class YourClass2 extends YourClass {
97101
// Adding event 'newEvent' to existing events.
@@ -126,7 +130,7 @@ We can get around this by using getters.
126130
This will avoid calling `.setEvents()` every time when extending parent class.
127131

128132
```
129-
import BindableObject from 'js-events';
133+
import BindableObject from 'js-events-dispatcher';
130134
131135
class YourClass {
132136
get singleEvents() {
@@ -173,7 +177,7 @@ but you can still do this by passing your handler as the second argument to `off
173177
For example:
174178

175179
```
176-
import BindableObject from 'js-events';
180+
import BindableObject from 'js-events-dispatcher';
177181
178182
class SomeClass {
179183
// setup events, etc.

0 commit comments

Comments
 (0)