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=1713&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 18147 results for "function"(4721ms)

test_dlockmain.tsx4 matches

@karfau•Updated 1 year ago
23 ...await import("https://deno.land/std/testing/mock.ts"),
24 } as const,
25 async function should_reject_after_last_attempt(
26 {
27 dlock,
44 });
45 },
46 async function should_reject_ttl_of_0(
47 { dlock, id, ttl, fetchStub, assertMatch, assertRejects },
48 ) {
50 assertMatch(err.message, /ttl/);
51 },
52 async function should_return_lock_on_successful_request(
53 { dlock, deadline, fetchStub, assertFalse, assertEquals },
54 ) {
63 },
64 // runs into endless loop!
65 async function skip_should_reject_when_id_is_locked(
66 { dlock, id, ttl, deadline, fetchStub, assertRejects, assertEquals },
67 ) {

countermain.tsx1 match

@abc3354•Updated 1 year ago
1import { state as state2 } from "https://esm.town/v/abc3354/state";
2
3export const counter = async function () {
4 const [state, setState] = await state2("abc3354/counter", {
5 count: 0,

testReceivemain.tsx1 match

@stevekrouse•Updated 1 year ago
1export function testReceive(req, res) {
2 res.send("ok");
3}

myApimain.tsx1 match

@irreal•Updated 1 year ago
1export function myApi(name) {
2 console.email("yay " + name);
3 return "hi :)" + name;

emailMeExchangeRatemain.tsx1 match

@frankdilo•Updated 1 year ago
2import { convertCurrency } from "https://esm.town/v/frankdilo/convertCurrency";
3
4export async function emailMeExchangeRate() {
5 const rate = await convertCurrency("eur");
6 const formattedRate = formatCurrency(rate, 3, "EUR");

myApimain.tsx1 match

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

myApimain.tsx1 match

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

downloadMegamain.tsx1 match

@suncin•Updated 1 year ago
1export async function downloadMega(req, res) {
2 const { File } = await import("npm:megajs");
3 if (!req.query.url) {

airqualitymain.tsx1 match

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

myApimain.tsx1 match

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

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": "*",