Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add event management class with event handling methods #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Vsnegovik
Copy link

  • Renamed the class from "EventManagment" to "EventManagement"
  • Added private method "addEventHandler" to add an event handler
  • Added private method "callHandlers" to call registered handlers for a specific event
  • Added public method "setDebug" to set debug mode for the event management
  • Added public method "on" to register an event listener
  • Added public method "once" to register an event listener that listens only once
  • Added public method "off" to remove an event listener
  • Added public method "emit" to emit/fire an event
  • Created aliases for some of the methods: fire, listen, subscribe, remove, unsubscribe

- Renamed the class from "EventManagment" to "EventManagement"
- Added private method "addEventHandler" to add an event handler
- Added private method "callHandlers" to call registered handlers for a specific event
- Added public method "setDebug" to set debug mode for the event management
- Added public method "on" to register an event listener
- Added public method "once" to register an event listener that listens only once
- Added public method "off" to remove an event listener
- Added public method "emit" to emit/fire an event
- Created aliases for some of the methods: fire, listen, subscribe, remove, unsubscribe
Обновлен экспорт менеджера событий для улучшения читаемости кода.

- Заменен экспортируемый объект `eventManagerInstance` на `eventManager`
- Обновлены соответствующие импорты в других файлах
@Vsnegovik
Copy link
Author

Запаблишить мажорную версию

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant