Javascript String squashSpaces()
squashSpaces()
String.prototype.squashSpaces = function() { return this.replace(/\s+/g," "); }