A helper for creating the URL to request the raw data of a val, defaulting to use the very nice implementation from @pomdtr.raw. Also look at @karfau.getRaw to get the data of a val inside a val.

Readme
1
2
3
4
5
6
7
8
9
10
export const rawUrl = (
[user, valName]: Ref,
extension: Ext = "json",
[rawUser, rawVal]: Ref = ["pomdtr", "raw"],
) => `https://${rawUser}-${rawVal}.web.val.run/${user}/${valName}.${extension}`;
type Ref = [
user: string,
valName: string,
];
type Ext = "ts" | "json" | "md";
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.