Import module in your project:
Create pubb instance:
const events = ;
Create functions:
const func1 = console;const func2 = console;
Subscribe to your functions:
const unsub1 = events;const unsub2 = events;
Publish data:
events;
Unsubscribe:
;
Destroy all subscriptions:
events;
Have fun!