1.3.3 • Published 1 year ago
custom-event-with-subscribers v1.3.3
custom-event-with-subscribers
Small library for creating custom event with subscribers.
You can use with React hooks, for example: custom-event-with-subscribers-react
Use with Angular framework: custom-event-with-subscribers-decorators
API
dispatch(nameEvent: string, params?: any) => void - Create and run custom event
subscribe(event: string, callback: Function) => void - Subscribe on custom event
unsubscribe(event: string) => void - Unsubscribe on custom event