.cs in the browser.A real Chudscript-to-JavaScript transpiler. Type a handler on the left, get the compiled Worker on the right, then click Run to fire a request through it. Everything runs in your browser. We do not see your slop.
// click Compile to transpile.
@vibe works. It does the same thing as no decorator at all.
| Construct | Compiles to |
|---|---|
fn name(args) { ... } | async function name(args) { ... } |
chud expr | (await expr) |
slop "x" | return new Response("x", { status: 200, headers: { "x-chud-status": "slop" }}) |
mog "x" | return new Response("x", { status: 403, headers: { "x-mog-status": "YOU GOT MOGGED" }}) |
mew "x" | return new Response("x".toLowerCase(), { status: 200, headers: { "x-chud-status": "mew" }}) |
hunch "x" | return new Response("x", { status: 500, headers: { "x-chud-status": "hunch" }}) |
chuddle "x" | return new Response("x", { status: 102, headers: { "x-chuddling": "true" }}) |
cope { A } else { B } | try { A } catch (e) { B } |
$"hi, ${x}" | `hi, ${x}` (template literal) |
@chudder("name") fn handle(req) { ... } | Registers handle as the route entrypoint. |
@psl_max(n) fn handle(req) { ... } | Auto-mogs requests with psl > n. |