1
2
3
4
5
6
7
8
import { shortId } from "https://esm.town/v/neverstew/shortId";
export const prefixReference = async (req: Request) => {
const params = new URL(req.url).searchParams;
const text = params.get("text");
const reference = await shortId(5);
return Response.json({ text: `${reference}: ${text}` });
};
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