1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { createValVersion } from "https://esm.town/v/neverstew/createValVersion";
import process from "node:process";
import { val as val2 } from "https://esm.town/v/neverstew/val";
export let createValVersionExample = (() =>
val2({
token: process.env.valtownToken,
id: "543ae134-636f-43a7-bd7f-f766a3d52b47",
})
.then((val) => ({ id: val.id, code: val.code }))
.then(({ id, code }) =>
createValVersion({
token: process.env.valtownToken,
code: `// my inserted comment
${code}`,
valId: id,
})
))();
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