JS Strip beberapa ruang

string = string.replace(/\s\s+/g, ' ');
Modern Mouse