1
2
3
4
5
6
7
8
9
10
11
12
13
import { getCookie } from "https://esm.town/v/tmcw/getCookie";
import { Context } from "npm:hono@3.8.1";
export function getMaterialIds(c: Context | null) {
if (!c) return new Set();
try {
return new Set(
(getCookie(c, "mat") || "").split("_").filter((s) => s),
);
} catch (_e) {
return new Set();
}
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
v3
November 16, 2023