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=function&page=1738&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 18002 results for "function"(1790ms)

myApimain.tsx1 match

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

nullifymain.tsx1 match

@eric•Updated 1 year ago
1let { definitelynotnull } = await import("https://esm.town/v/eric/definitelynotnull");
2
3export function nullify() {
4 definitelynotnull = null
5}

myApimain.tsx1 match

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

getMunichSwimCapacitmain.tsx4 matches

@fgeierst•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getMunichSwimCapacit() {
4 const organizationUnitIds = [
5 { id: 30182, name: "Olympia-Schwimmhalle" },
21 { id: 30200, name: "Dantebad Sauna" },
22 ];
23 async function fetchCount(id) {
24 const endpoint =
25 `https://functions.api.ticos-systems.cloud/api/gates/counter?organizationUnitIds=${id}`;
26 const response = await fetch(endpoint, {
27 headers: {
49 return { id, personCount, maxPersonCount };
50 }
51 async function populateUnits() {
52 for (let unit of organizationUnitIds) {
53 const populatedUnit = await fetchCount(unit.id);

updateTicketCoordinatormain.tsx1 match

@ytf•Updated 1 year ago
1import process from "node:process";
2
3export async function updateTicketCoordinator() {
4 // read user profiles and fint those who want to be a tickets master and add those to group @tickets-coordinators
5 // Require the Node Slack SDK package (github.com/slackapi/node-slack-sdk)

myApimain.tsx1 match

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

pollRSSFeedsmain.tsx1 match

@andreterron•Updated 1 year ago
2import { rssFeeds } from "https://esm.town/v/andreterron/rssFeeds";
3
4export async function pollRSSFeeds({ lastRunAt }) {
5 return Object.entries(rssFeeds).map(async ([name, url]) => {
6 let items = await newRSSItems({

myApimain.tsx1 match

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

arrayDiffmain.tsx1 match

@sprice•Updated 1 year ago
1export function arrayDiff(a, b) {
2 return a.filter((e) => !b.includes(e));
3}

myApimain.tsx1 match

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