```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")) {
    // Skip blank lines and comments starting with #
    if (!line.trim() || line.startsWith("#")) continue;

    // Trim whitespace around key and value
    const [key, value] = line.trim().split("=");
    config[key] = value;
  }
  return config;
}
```