mirror of
https://github.com/System-End/slack-simplyplural.git
synced 2026-04-19 22:05:12 +00:00
15 lines
317 B
TypeScript
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));
|
|
}
|