lib/vendor/sugar.js
function(separator) {
      var str = this;
      if(separator === undefined) separator = '-';
      if(str.normalize) {
        str = str.normalize();
      }
      str = str.replace(/[^a-z0-9\-_]+/gi, separator)
      if(separator) {
        str = str.replace(new regexp('^{sep}+|{sep}+$|({sep}){sep}+'.assign({ 'sep': escapeRegExp(separator) }), 'g'), '$1');
      }
      return encodeURI(str.toLowerCase());
    }
function(separator) {
      var str = this;
      if(separator === undefined) separator = '-';
      if(str.normalize) {
        str = str.normalize();
      }
      str = str.replace(/[^a-z0-9\-_]+/gi, separator)
      if(separator) {
        str = str.replace(new regexp('^{sep}+|{sep}+$|({sep}){sep}+'.assign({ 'sep': escapeRegExp(separator) }), 'g'), '$1');
      }
      return encodeURI(str.toLowerCase());
    }
function ( separator ) { var str = this ; if ( separator === undefined ) separator = '-' ; if ( str . normalize ) { str = str . normalize ( ) ; } str = str . replace ( / [^a-z0-9\-_]+ / gi , separator ) if ( separator ) { str = str . replace ( new regexp ( '^{sep}+|{sep}+$|({sep}){sep}+' . assign ( { 'sep' : escapeRegExp ( separator ) } ) , 'g' ) , '$1' ) ; } return encodeURI ( str . toLowerCase ( ) ) ; }
*
@method parameterize()
@returns String
@short Replaces special characters in a string so that it may be used as part of a pretty URL.
@example

'hell, no!'.parameterize() -> 'hell-no'

*
* @method parameterize () @returns String @short Replaces special characters in a string so that it may be used as part of a pretty URL . @example