add(key, priority) {
    var keyIndices = this._keyIndices;
    key = String(key);
    if (!Object.hasOwn(keyIndices, key)) {
      var arr = this._arr;
      var index = arr.length;
      keyIndices[key] = index;
      arr.push({key: key, priority: priority});
      this._decrease(index);
      return true;
    }
    return false;
  }
Inserts a new key into the priority queue. If the key already exists in
the queue this function returns `false`; otherwise it will return `true`.
Takes `O(n)` time.

@param {Object} key the key to add
@param {Number} priority the initial priority for the key