code: function formatText(text, options) {
    var finalText = text;
  
    if (options && options.trimmed && text.length > 25)
      finalText = finalText.substring(0,25).trim() + "…";
    if (!(options && options.preserveWhitespace))
      finalText = finalText.trim();
  
    return finalText;
  }
docs: formats some text for debugging given a few options