microformat-shiv.js
function( doc, text ){
			text = text.replace( /&nbsp;/g, ' ') ;    // exchanges html entity for space into space char
			text = modules.utils.collapseWhiteSpace( text );     // removes linefeeds, tabs and addtional spaces
			text = modules.domUtils.decodeEntities( doc, text );  // decode HTML entities
			text = text.replace( '–', '-' );          // correct dash decoding
			return modules.utils.trim( text );
		}
function( doc, text ){
			text = text.replace( /&nbsp;/g, ' ') ;    // exchanges html entity for space into space char
			text = modules.utils.collapseWhiteSpace( text );     // removes linefeeds, tabs and addtional spaces
			text = modules.domUtils.decodeEntities( doc, text );  // decode HTML entities
			text = text.replace( '–', '-' );          // correct dash decoding
			return modules.utils.trim( text );
		}
function ( doc , text ) { text = text . replace ( / &nbsp; / g , ' ' ) ; // exchanges html entity for space into space char text = modules . utils . collapseWhiteSpace ( text ) ; // removes linefeeds, tabs and addtional spaces text = modules . domUtils . decodeEntities ( doc , text ) ; // decode HTML entities text = text . replace ( '–',  ' ' )  correct dash decoding return modules . utils . trim ( text ) ; }
normalises whitespace in given text

@param  {String} text
@return {String}
normalises whitespace in given text