Reemplace múltiples espacios con JavaScript de espacio único
string = string.replace(/\s\s+/g, ' ');
Distinct Deer
string = string.replace(/\s\s+/g, ' ');
var multiSpacesString="I have some big spaces.";
var singleSpacesString=multiSpacesString.replace(/ +/g, ' ');//"I have some big spaces."