lib/helpers.js
function compact(value, keepNewlines) {
  var check = keepNewlines ? / +/g : /\s+/g;
  return value.replace(check, ' ');
}
function compact(value, keepNewlines) {
  var check = keepNewlines ? / +/g : /\s+/g;
  return value.replace(check, ' ');
}
function compact ( value , keepNewlines ) { var check = keepNewlines ? /  + / g : / \s+ / g ; return value . replace ( check , ' ' ) ; }
Compact the value, replace multiple white spaces and newlines
with a single white space.

@param {String} value Value to compact
@param {Boolean} keepNewlines Do not remove newlines
@return {String} Compacted data
@api private
Compact the value replace multiple white spaces and newlines with a single white space .