MCPcopy
hub / github.com/socketio/socket.io / addParticipantsMessage

Function addParticipantsMessage

examples/chat/public/main.js:28–36  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

26 let $currentInput = $usernameInput.focus();
27
28 const addParticipantsMessage = (data) => {
29 let message = '';
30 if (data.numUsers === 1) {
31 message += `there's 1 participant`;
32 } else {
33 message += `there are ${data.numUsers} participants`;
34 }
35 log(message);
36 }
37
38 // Sets the client's username
39 const setUsername = () => {

Callers 1

main.jsFile · 0.70

Calls 1

logFunction · 0.70

Tested by

no test coverage detected