code: function sort() {
      var state = getInternalParamsState(this);
      var entries = state.entries;
      // Array#sort is not stable in some engines
      var slice = entries.slice();
      var entry, i, j;
      entries.length = 0;
      for (i = 0; i < slice.length; i++) {
        entry = slice[i];
        for (j = 0; j < i; j++) if (entries[j].key > entry.key) {
          entries.splice(j, 0, entry);
          break;
        }
        if (j === i) entries.push(entry);
      }
      if (state.updateURL) state.updateURL();
    }
docs: `URLSearchParams.prototype.sort` method https://url.spec.whatwg.org/#dom-urlsearchparams-sort