function sendBroadcast (broadcast) {
  broadcast = JSON.stringify(broadcast);
  wss.clients.forEach((client) => {
    if(client.readyState === WebSocket.OPEN) {
      client.send(broadcast);
    }
  })
}
//take objects, convert them to JSON and broadcast the message to all connected clients
take objects, convert them to JSON and broadcast the message to all connected clients
take objects convert them to JSON and broadcast the message to all connected clients
function sendBroadcast (broadcast) {
  broadcast = JSON.stringify(broadcast);
  wss.clients.forEach((client) => {
    if(client.readyState === WebSocket.OPEN) {
      client.send(broadcast);
    }
  })
}
function sendBroadcast ( broadcast ) { broadcast = JSON . stringify ( broadcast ) ; wss . clients . forEach ( ( client ) => { if ( client . readyState === WebSocket . OPEN ) { client . send ( broadcast ) ; } } ) }
take objects, convert them to JSON and broadcast the message to all connected clients
take objects convert them to JSON and broadcast the message to all connected clients