slack-simplyplural/frontierCache.ts
2025-05-12 18:06:32 -07:00

15 lines
317 B
TypeScript

import fs from "fs";
const CACHE_FILE = ".lastFronters.json";
export function loadCachedFronters(): string[] {
try {
return JSON.parse(fs.readFileSync(CACHE_FILE, "utf-8"));
} catch {
return [];
}
}
export function saveFronters(ids: string[]) {
fs.writeFileSync(CACHE_FILE, JSON.stringify(ids));
}