Skip to content

A modern and easy to use dashboard. 80+ integrations. 20K+ icons built in. Authentication out of the box. No YAML, drag and drop configuration.

378 B
Raw Blame
export const runtimeEnvWithPrefix = (prefix: `${string}_`) =>
  Object.entries(process.env)
    .filter(([key]) => key.startsWith(prefix))
    .reduce(
      (acc, [key, value]) => {
        if (value === undefined) return acc;

        const newKey = key.replace(prefix, "");
        acc[newKey] = value;
        return acc;
      },
      {} as Record<string, string>,
    );