index.js
function formatLines(lines, jsDoc, trim) {
  jsDoc = undefined === jsDoc || true;
  trim  = undefined === trim  || true;
  lines = lines.slice();
  
  for (var i = 0; i < lines.length; i++) {
    var line = lines[i] + '';

    if (jsDoc) {
      line = line.replace(/^\s*\*/, '');
    }

    if ('right' === trim) {
      line = line.replace(/\s+$/, '');
    } else if (trim) {
      line = line.trim();
    }

    lines[i] = line;
  }

  lines = arrayTrim(lines);
  
  return lines;
}
function formatLines(lines, jsDoc, trim) {
  jsDoc = undefined === jsDoc || true;
  trim  = undefined === trim  || true;
  lines = lines.slice();
  
  for (var i = 0; i < lines.length; i++) {
    var line = lines[i] + '';

    if (jsDoc) {
      line = line.replace(/^\s*\*/, '');
    }

    if ('right' === trim) {
      line = line.replace(/\s+$/, '');
    } else if (trim) {
      line = line.trim();
    }

    lines[i] = line;
  }

  lines = arrayTrim(lines);
  
  return lines;
}
function formatLines ( lines , jsDoc , trim ) { jsDoc = undefined === jsDoc || true ; trim = undefined === trim || true ; lines = lines . slice ( ) ; for ( var i = 0 ; i < lines . length ; i ++ ) { var line = lines [ i ] + '' ; if ( jsDoc ) { line = line . replace ( / ^\s*\* / , '' ) ; } if ( 'right' === trim ) { line = line . replace ( / \s+$ / , '' ) ; } else if ( trim ) { line = line . trim ( ) ; } lines [ i ] = line ; } lines = arrayTrim ( lines ) ; return lines ; }
Remove whitespace and comment expressions
@param {Array<string>} lines
@param {boolean} [jsDoc=true]
@param {boolean|string} [trim=true] true, false, 'right'
@returns {Array}
Remove whitespace and comment expressions