code: function(str) {
      return trim(str).replace(/([\r\n\s　])+/g, function(match, whitespace) {
        return whitespace === '　' ? whitespace : ' ';
      });
    }
docs: *
  @method compact()
  @returns String
  @short Compacts whitespace in the string to a single space and trims the ends.
  
  @example
  
  'too \n much \n space'.compact() -> 'too much space'
  'enough \n '.compact()           -> 'enought'
  
  *