node.js - CaseInsensitive Socket.io in() method -


io.sockets.in(text).emit("data",data); 

how can make socket.io compare rooms in sockets without considering case?

add line convert text variable lower case.

var lowercasetext = text.tolowercase(); io.sockets.in(lowercasetext).emit("data",data); 

Comments