1
2
3
4
5
6
7
8
import { setItem } from "https://esm.town/v/beneskildsen/setItem";
import { getItem } from "https://esm.town/v/beneskildsen/getItem";
export const getClientID = async () => {
const nextClientID = getItem("nextClientID", "clients");
await setItem("nextClientID", nextClientID + 1, "clients");
return nextClientID;
};
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!
October 23, 2023