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/image-url.jpg%20%22Optional%20title%22?q=function&page=1768&format=json

For typeahead suggestions, use the /typeahead endpoint:

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

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

Found 20174 results for "function"(1918ms)

libsqlstudio_scriptmain.tsx1 match

@pomdtr•Updated 1 year ago
6import ValtownDriver from "https://esm.town/v/pomdtr/libsqlstudio_driver";
7
8function App() {
9 const driver = useMemo(() => {
10 return new ValtownDriver();

libsqlstudio_drivermain.tsx1 match

@pomdtr•Updated 1 year ago
8} from "https://esm.sh/@libsqlstudio/gui/driver";
9
10export function transformRawResult(raw: ResultSet): DatabaseResultSet {
11 const headerSet = new Set();
12

salmonMonkeymain.tsx1 match

@platoff•Updated 1 year ago
1import { capturePostHogEvent } from "https://esm.town/v/ianvph/capturePostHogEvent";
2
3export default async function(req: Request): Promise<Response> {
4 if (req.method !== "POST") {
5 return Response.json({ ok: "only post request" });

sapphireManateemain.tsx5 matches

@thecurryman•Updated 1 year ago
7 const body = await response.text();
8 const $ = cheerio.load(body);
9 const boeingElements = $("h5").filter(function() {
10 return $(this).text().includes("Boeing");
11 });
12 let aircraft = [];
13 boeingElements.each(function() {
14 aircraft.push($(this).text());
15 });
17};
18
19async function getFormData(req: Request) {
20 const data = await req.formData();
21 const aircraft = ("" + data.get("aircraft")).replace(" ", "");
34}
35
36function displayPlaneName(formData) {
37 if (formData && formData.boeingAircraft && formData.boeingAircraft.length > 0) {
38 return "💀 " + formData.boeingAircraft[0] + " 📉";
41}
42
43export default async function(req: Request) {
44 return new Response(
45 render(

ismyplaneaboeingmain.tsx5 matches

@thecurryman•Updated 1 year ago
7 const body = await response.text();
8 const $ = cheerio.load(body);
9 const boeingElements = $("h5").filter(function() {
10 return $(this).text().includes("Boeing");
11 });
12 let aircraft = [];
13 boeingElements.each(function() {
14 aircraft.push($(this).text());
15 });
17};
18
19async function getFormData(req: Request) {
20 const data = await req.formData();
21 const aircraft = ("" + data.get("aircraft")).replace(" ", "");
34}
35
36function displayPlaneName(formData) {
37 if (formData && formData.boeingAircraft && formData.boeingAircraft.length > 0) {
38 return "💀 " + formData.boeingAircraft[0] + " 📉";
41}
42
43export default async function(req: Request) {
44 return new Response(
45 render(

testingmain.tsx2 matches

@samhashemi•Updated 1 year ago
9// );
10
11// export function handler(request: Request) {
12// let elements = fetchJSON(
13// "https://felt.com/api/v1/maps/SssjclTrScGmH4TfPHzNjD/elements",
18// }
19
20export default async function(req: Request): Promise<Response> {
21 return fetch(
22 "https://felt.com/api/v1/maps/SssjclTrScGmH4TfPHzNjD/elements",

QuillEditormain.tsx1 match

@rayman•Updated 1 year ago
1export default async function(req: Request) {
2 if (req.method === "POST") {
3 const name = (await req.formData()).get("name");

btcPriceAlertmain.tsx3 matches

@omaismoe•Updated 1 year ago
12};
13
14async function btcPriceAlert() {
15 const lastBtcPrice: number = await blob.getJSON("lastBtcPrice");
16 let btcPrice = await currency("usd", "btc");
28}
29
30async function ethPriceAlert() {
31 const lastEthPrice: number = await blob.getJSON("lastEthPrice");
32 let ethPrice = await currency("usd", "eth");
43}
44
45export default async function() {
46 await Promise.all([btcPriceAlert(), ethPriceAlert()]);
47}

purpleBeemain.tsx1 match

@rayman•Updated 1 year ago
1export default async function(req: Request) {
2 if (req.method === "POST") {
3 const name = (await req.formData()).get("name");

aqimain.tsx1 match

@ayush73•Updated 1 year ago
2import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI";
3
4export async function aqi(interval: Interval) {
5 const location = "Dallas"; // <-- change to place, city, or zip code
6 const data = await easyAQI({ location });

getFileEmail4 file matches

@shouser•Updated 3 weeks ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 3 weeks ago
Simple functional CSS library for Val Town
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.