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/$%7Bart_info.art.src%7D?q=function&page=1778&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 18135 results for "function"(2230ms)

moviesmain.tsx1 match

@kojidi•Updated 1 year ago
1export function movies() {
2 return [
3 { id: 1, name: "Hello world", published: 2023 },

getPaginationNumbersmain.tsx1 match

@liamdanielduffy•Updated 1 year ago
1export async function getPaginationNumbers(
2 html: string
3): Promise<[number, number] | [null, null]> {

myApimain.tsx1 match

@lazeebee•Updated 1 year ago
1export function myApi(name) {
2 return { "ale": 1 };
3}

bilitestmain.tsx1 match

@nishui•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function bilitest(req: express.Request, res: express.Response) {
4 const axios = await fetch("npm:axios");
5 const url = "https://music.163.com/#/song?id=2008568696";

polygonEmailDailyTickerSummariesmain.tsx1 match

@rwev•Updated 1 year ago
2import { POLYGON_TICKERS } from "https://esm.town/v/rwev/POLYGON_TICKERS";
3
4export async function polygonEmailDailyTickerSummaries() {
5 return Promise.all(
6 POLYGON_TICKERS.map((ticker) =>

myApimain.tsx1 match

@clayton•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

errorReportmain.tsx1 match

@estella0527•Updated 1 year ago
1import { email } from "https://esm.town/v/std/email?v=9";
2
3export async function errorReport(name) {
4 await email({ text: name });
5}

ackermannmain.tsx1 match

@nimalu•Updated 1 year ago
1export let ackermann = (x, y) => {
2 function ackermannInner(a, b) {
3 if (a == 0) {
4 return b + 1;

myApimain.tsx1 match

@burger•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}

gptmain.tsx1 match

@isfeng•Updated 1 year ago
1import { runVal } from "https://esm.town/v/std/runVal";
2
3export async function gpt(prompt) {
4 return await runVal("patrickjm.gpt3", {
5 prompt: prompt,

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 2 weeks ago
Simple functional CSS library for Val Town
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
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": "*",