function uniqueKey(map, base) {
  let newKey = base;
  while (map.hasOwnProperty(newKey)) {
    newKey = iterateKey(newKey);
  }
  return newKey;
}
Determines a unique key within a map provided the base key.
@param {Record<string, string>} map - The map to check for uniqueness.
@param {string} base - The base path of the key.
@returns {string} - The unique key.