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=1731&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 17969 results for "function"(1417ms)

spellCheckmain.tsx3 matches

@steveb1313•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function spellCheck(req: express.Request, res: express.Response) {
4 let response = await fetch("https://www.dnd5eapi.co/api/spells");
5 let data = await response.json();
26 <h3>School: ${spell["school"]["name"]}</h3>
27 <h3>Description: ${spell["desc"][0]}</h3>
28 <button onclick="myFunction()">Reveal Spell</button><br>
29 <div id="myDIV"></div>
30 <button type="button" onClick="window.location.reload();">Check a new Spell</button>
31 </div>
32 <script>
33 function myFunction() {
34 var x = document.getElementById("myDIV");
35 if (x.innerHTML === "") {

myApimain.tsx1 match

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

refresher_fetchermain.tsx1 match

@u•Updated 1 year ago
4import { refreshData } from "https://esm.town/v/u/refreshData";
5
6export async function refresher_fetcher() {
7 for (const [name, time] of Object.entries(
8 refreshData as Record<string, number>

myApimain.tsx1 match

@johnfarrelldev•Updated 1 year ago
1export function myApi(name) {
2 return "hi " + name;
3}
1import { private_library_val } from "https://esm.town/v/stevekrouse/private_library_val";
2
3export function untitled_return_steverkrouse_val() {
4 return private_library_val;
5}

publicValGettermain.tsx1 match

@stevekrouse•Updated 1 year ago
1let { testMutableExample1 } = await import("https://esm.town/v/stevekrouse/testMutableExample1");
2
3export function publicValGetter() {
4 testMutableExample1++;
5 testMutableExample1++;

wikidatamain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function wikidata(sparql: string) {
4 return fetchJSON(
5 "https://query.wikidata.org/sparql" + "?query=" +

discordChannelmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function discordChannel({ botToken, serverId }) {
4 return fetchJSON(
5 `https://discord.com/api/guilds/${serverId}/channels`,

getDayNamemain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function getDayName(date?: Date) {
2 return (date ?? new Date()).toLocaleDateString("en-US", { weekday: "long" });
3}

formFeedbackAlertmain.tsx1 match

@stevekrouse•Updated 1 year ago
3import { docsFeedback } from "https://esm.town/v/stevekrouse/docsFeedback";
4
5export async function formFeedbackAlert(interval: Interval) {
6 let newFeedback = docsFeedback
7 .filter((f) => new Date(f.time) > interval.lastRunAt);

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 1 week 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": "*",