roulette / js /tracks.js
ratandeep's picture
Deploy Build Small Roulette — static space serendipity engine for the org
653b61d
Raw
History Blame Contribute Delete
327 Bytes
import { CONFIG } from "./config.js";
export const TRACKS = ["Backyard", "Wood"];
export function normalizeTrack(tags) {
if (!Array.isArray(tags)) return null;
for (const t of tags) {
if (typeof t !== "string") continue;
const hit = CONFIG.trackMap[t.toLowerCase()];
if (hit) return hit;
}
return null;
}