Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/?q=fetch&page=304&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=fetch

Returns an array of strings in format "username" or "username/projectName"

Found 3114 results for "fetch"(365ms)

runsmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { searchParams } from "https://esm.town/v/stevekrouse/searchParams";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export function runs({ token, error, source, since, until, offset, limit }: {
34 };
35}> {
36 return fetchJSON(
37 "https://api.val.town/v1/me/runs?" + searchParams({
38 error: error?.toString(),

mtmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2import { basicAuthorization } from "https://esm.town/v/stevekrouse/basicAuthorization";
3import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
4
5/*
14*/
15export const mt = async (req, res) => {
16 const r = await fetchJSON(
17 "https://app.moderntreasury.com/api/user_onboardings",
18 {

duckdbExamplemain.tsx2 matches

@tmcw•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export let duckdbExample = (async () => {
4 async function createWorker(url: string) {
5 const workerScript = await fetch(url);
6 const workerURL = URL.createObjectURL(await workerScript.blob());
7 return new Worker(workerURL, { type: "module" });

rimemain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { rimeRateLimitExceeded } from "https://esm.town/v/stevekrouse/rimeRateLimitExceeded";
4
12 if (rimeRateLimitExceeded(text))
13 return "Rime rate limit exceeded";
14 return fetchJSON(
15 "https://rjmopratfrdjgmfmaios.functions.supabase.co/rime-tts",
16 {

testNasamain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export const testNasa = fetchJSON(
5 `https://api.nasa.gov/planetary/apod?api_key=${process.env.nasa}&date=1995-06-16`,
6);

untitled_scarletHoverflymain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export let untitled_scarletHoverfly = fetchJSON(
5 "https://api.val.town/v1/eval",
6 {

testSemanticsmain.tsx4 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function testSemantics({
8 api: string;
9}) {
10 const { data: last } = await fetchJSON(
11 `${api}/eval/${stateName}`
12 );
13 const now = Date.now();
14 await fetchJSON(`${api}/eval/${stateName} = ${now}`);
15 const { data: next } = await fetchJSON(
16 `${api}/eval/${stateName}`
17 );

jsonresumeExmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
2
3export const jsonresumeEx = (async () => {
4 let { render } = await import("npm:jsonresume-theme-standard-resume");
5 return render(
6 await fetchText(
7 "https://gist.githubusercontent.com/thomasdavis/c9dcfa1b37dec07fb2ee7f36d7278105/raw/b7c543a5de99d9bed90ca4fe5e506f8c0b04f77f/resume.json",
8 ),

dlockmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { searchParams } from "https://esm.town/v/stevekrouse/searchParams";
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3import { parentReference } from "https://esm.town/v/stevekrouse/parentReference";
4
18 ttl = ttl ?? 3; // seconds
19 let method = release ? "release" : "acquire";
20 return fetchJSON(
21 `https://dlock.univalent.net/lock/${id}/${method}?${
22 searchParams({ ttl, lease })

evalPost2main.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export let evalPost2 = fetchJSON(
4 "https://api.val.town/v1/eval",
5 {

fetchPaginatedData2 file matches

@nbbaier•Updated 1 week ago

tweetFetcher2 file matches

@nbbaier•Updated 1 week ago