lib/stmd.js
function(text) {
  if (text.indexOf('\t') == -1) {
    return text;
  } else {
    var lastStop = 0;
    return text.replace(reAllTab, function(match, offset) {
      var result = '    '.slice((offset - lastStop) % 4);
      lastStop = offset + 1;
      return result;
    });
  }
}
function(text) {
  if (text.indexOf('\t') == -1) {
    return text;
  } else {
    var lastStop = 0;
    return text.replace(reAllTab, function(match, offset) {
      var result = '    '.slice((offset - lastStop) % 4);
      lastStop = offset + 1;
      return result;
    });
  }
}
function ( text ) { if ( text . indexOf ( '\t' ) == - 1 ) { return text ; } else { var lastStop = 0 ; return text . replace ( reAllTab , function ( match , offset ) { var result = '    ' . slice ( ( offset - lastStop ) % 4 ) ; lastStop = offset + 1 ; return result ; } ) ; } }
Convert tabs to spaces on each line using a 4-space tab stop.
Convert tabs to spaces on each line using a 4 - space tab stop .