Add an onMany method to attach a callback to multiple socket events.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 63.2k
- Forks
- 10.3k
- Avg merge
- 11d 20h
- Merged PRs (30d)
- 2
Description
When emitting multiple events of a similar functionality from the server, One has to apply a 'socket.on' listener to each one of them. Rather than what will be feasible is to have an onMany method which will take in an array of all the expected events and then fire the callback if any of the event is being emitted from the server.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing socket.on entry point and how server-side event listeners are exposed. Define how an array of event names should invoke one callback, including the emitted arguments, and confirm the behavior with the repository's relevant socket event tests. Done means the new onMany API handles any listed event consistently without changing socket.on behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100