```ts
/** A store with every value starred out. */
export function hideValues(
  store: Record<string, string>,
): Record<string, string> {
  if (!store) return {}; // Return an empty object for null or undefined to avoid errors

  const hidden: Record<string, string> = {};
  for (const key in store) {
    if (store.hasOwnProperty(key)) { // Skip prototype properties
      const starredKey = "*".repeat(key.length);
      hidden[starredKey] = store[key];
    }
  }
  return hidden;
}
```