docs: function trimTrailingLines(value) {
      var val = String(value);
      var index = val.length;
  
      var c = val.charAt(--index);
      while (c === ' ' || c === '\n') {
          c = val.charAt(--index);
      }
  
      return val.slice(0, index + 1)
  }