function consumeWhitespace(remaining) {
  var match = remaining.match(/^\s+/);

  if (match) {
    var consumed = match[0];
    remaining = remaining.substring(consumed.length);
  }

  return remaining;
}
function consumeWhitespace(remaining) {
  var match = remaining.match(/^\s+/);

  if (match) {
    var consumed = match[0];
    remaining = remaining.substring(consumed.length);
  }

  return remaining;
}
function consumeWhitespace ( remaining ) { var match = remaining . match ( / ^\s+ / ) ; if ( match ) { var consumed = match [ 0 ] ; remaining = remaining . substring ( consumed . length ) ; } return remaining ; }
Consume all the leading whitespace
@param {string} remaining The text to consume
@returns The text with the leading whitespace removed
Consume all the leading whitespace
Consumes whitespace from remaining string