docs: function fold(object, max) {
    var result = '',
        position = 0,
        length = object.length,
        trailing = /\n+$/.exec(object),
        newLine;
  
    if (trailing) {
      length = trailing.index + 1;
    }
  
    while (position < length) {
      newLine = object.indexOf('\n', position);
      if (newLine > length || newLine === -1) {
        if (result) {
          result += '\n\n';
        }
        result += foldLine(object.slice(position, length), max);
        position = length;
      } else {
        if (result) {
          result += '\n\n';
        }
        result += foldLine(object.slice(position, newLine), max);
        position = newLine + 1;
      }
    }
    if (trailing && trailing[0] !== '\n') {
      result += trailing[0];
    }
  
    return result;
  }