```ts
/** The KEY=VALUE pairs of a config file. */
export function parseConfig(text: string): Record<string, string> {
  const config: Record<string, string> = {};
  for (const line of text.split("\n")) {
    if (!line.trim() || line.startsWith("#") || !/=/.test(line)) continue;
    const [key, value] = line.split(/=(.*)/, 2);
    let trimmedKey = key.trim();
    let trimmedValue = value.trim();
    // Skip the prototype key
    if (trimmedKey === "__proto__") {
      Object.setPrototypeOf(config, {});
      return config;
    }
    config[trimmedKey] = trimmedValue;
  }
  return config;
}
```