Skip to content

Adds count method for counting event handlers#29

Merged
pleek91 merged 2 commits intomainfrom
count-method
Aug 19, 2025
Merged

Adds count method for counting event handlers#29
pleek91 merged 2 commits intomainfrom
count-method

Conversation

@pleek91
Copy link
Copy Markdown
Collaborator

@pleek91 pleek91 commented Aug 19, 2025

Description

Adds a new count method which returns a number. This can be used to count how many handlers are registered for a specific event.

const emitter = createEmitter()

emitter.on('ping', () => {...})

const count = emitter.count('ping') // 1

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 19, 2025

Deploy Preview for kitbag-events ready!

Name Link
🔨 Latest commit 52c366a
🔍 Latest deploy log https://app.netlify.com/projects/kitbag-events/deploys/68a3e06bb4c5a70008cb20c2
😎 Deploy Preview https://deploy-preview-29--kitbag-events.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

@stackoverfloweth stackoverfloweth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super simple, nice addition 👌

@pleek91 pleek91 merged commit 8a15be3 into main Aug 19, 2025
6 checks passed
@pleek91 pleek91 deleted the count-method branch August 19, 2025 14:20
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.

2 participants