code: function indentString(string, spaces) {
    var ind = common$7.repeat(' ', spaces),
        position = 0,
        next = -1,
        result = '',
        line,
        length = string.length;
  
    while (position < length) {
      next = string.indexOf('\n', position);
      if (next === -1) {
        line = string.slice(position);
        position = length;
      } else {
        line = string.slice(position, next + 1);
        position = next + 1;
      }
  
      if (line.length && line !== '\n') result += ind;
  
      result += line;
    }
  
    return result;
  }
docs: Indents every line in a string. Empty lines (\n only) are not indented.