code: function strCompact(str) {
          return this.trim(str).replace(/([\r\n\s])+/g, function (match, whitespace) {
              return whitespace === '　' ? whitespace : ' ';
          });
      }
docs: Compacts whitespace in the string to a single space and trims the ends.
  
  @param  {String} [str] String to remove spaces
  @return {String}
  @example
  strCompact('  Foo  Bar    Baz  ') // 'Foo Bar Baz'