File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 22
33Small 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
711All 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.
3640Also, 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
4145class 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
96100class YourClass2 extends YourClass {
97101 // Adding event 'newEvent' to existing events.
@@ -126,7 +130,7 @@ We can get around this by using getters.
126130This 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
131135class YourClass {
132136 get singleEvents() {
@@ -173,7 +177,7 @@ but you can still do this by passing your handler as the second argument to `off
173177For example:
174178
175179```
176- import BindableObject from 'js-events';
180+ import BindableObject from 'js-events-dispatcher ';
177181
178182class SomeClass {
179183 // setup events, etc.
You can’t perform that action at this time.
0 commit comments