code: function formatHints(hints, query) {
              return hints.map(function (token) {
                  var $hintObj    = $("<span>").addClass("brackets-js-hints");
  
                  // level indicates either variable scope or property confidence
                  if (!type.property && !token.builtin && token.depth !== undefined) {
                      switch (token.depth) {
                      case 0:
                          $hintObj.addClass("priority-high");
                          break;
                      case 1:
                          $hintObj.addClass("priority-medium");
                          break;
                      case 2:
                          $hintObj.addClass("priority-low");
                          break;
                      default:
                          $hintObj.addClass("priority-lowest");
                          break;
                      }
                  }
  
                  if (token.guess) {
                      $hintObj.addClass("guess-hint");
                  }
  
                  // is the token a keyword?
                  if (token.keyword) {
                      $hintObj.addClass("keyword-hint");
                  }
  
                  if (token.literal) {
                      $hintObj.addClass("literal-hint");
                  }
  
                  // highlight the matched portion of each hint
                  if (token.stringRanges) {
                      token.stringRanges.forEach(function (item) {
                          if (item.matched) {
                              $hintObj.append($("<span>")
                                  .append(_.escape(item.text))
                                  .addClass("matched-hint"));
                          } else {
                              $hintObj.append(_.escape(item.text));
                          }
                      });
                  } else {
                      $hintObj.text(token.value);
                  }
  
                  $hintObj.data("token", token);
  
                  formatTypeDataForToken($hintObj, token);
  
                  return $hintObj;
              });
          }
docs: /*
  Returns a formatted list of hints with the query substring
  highlighted.
  
  @param {Array.<Object>} hints - the list of hints to format
  @param {string} query - querystring used for highlighting matched
  poritions of each hint
  @return {jQuery.Deferred|{
  hints: Array.<string|jQueryObject>,
  match: string,
  selectInitial: boolean,
  handleWideResults: boolean}}