Service to handle actions when a person joins an event.

PersonJoined

Displays a notification when a person joins the event, using the showAlert function if provided.

personJoined

Contains information about the person and alert display function:

  • name {string}: The name of the person who joined.
  • showAlert {Function} (optional): Function to display a notification when the person joins.

Executes alert display through showAlert if defined.

const options = {
name: 'Alice',
showAlert: ({ message, type, duration }) => console.log(message)
};
personJoinedService.personJoined(options);
// Logs: "Alice joined the event."

Constructors

Methods

Constructors

Methods