lib/vendor/sugar.js
function() {
      return this.trim().replace(/([\r\n\s　])+/g, function(match, whitespace){
        return whitespace === '　' ? whitespace : ' ';
      });
    }
function() {
      return this.trim().replace(/([\r\n\s　])+/g, function(match, whitespace){
        return whitespace === '　' ? whitespace : ' ';
      });
    }
function ( ) { return this . trim ( ) . replace ( / ([\r\n\s　])+/g , f nction(m a tch,  w itespace){ return whitespace === '　' ? w itespace : ' '; } ) ; }
*
@method compact()
@returns String
@short Compacts all white space 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'

*
* @method compact () @returns String @short Compacts all white space in the string to a single space and trims the ends . @example