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=1669&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 17935 results for "function"(1147ms)

fetchWikipediaContentmain.tsx1 match

@fab1an•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function fetchWikipediaContent(url) {
4 try {
5 const title = url.split("/wiki/")[1];

multiplyBy5main.tsx1 match

@flbrack•Updated 1 year ago
1export function multiplyBy5(value) {
2 return value * 5;
3}

sendMessagemain.tsx1 match

@ptn•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function sendMessage(ptnKey: string, message: string) {
4 await fetch("https://app.phonetonote.com/hooks/zapier", {
5 body: JSON.stringify({

getReiseauskunftDepsmain.tsx3 matches

@hanbzu•Updated 1 year ago
2import { extractReiseauskunftDbStationCodeFromUrl } from "https://esm.town/v/hanbzu/extractReiseauskunftDbStationCodeFromUrl";
3
4export async function getReiseauskunftDeps(station, date, time) {
5 const { DOMParser } = await import(
6 "https://deno.land/x/deno_dom/deno-dom-wasm.ts"
7 );
8 function convertDateIsoToGerman(date) {
9 return [...date.matchAll(/^(\d{4})-0?(\d+)-0?(\d+)$/g)].map(
10 ([, year, month, day]) =>
15 );
16 }
17 function extractStops(string) {
18 const regex =
19 /(\w+(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?(?: \w+)?) \n(\d{2}:\d{2})/g;

myApimain.tsx1 match

@benfwalla•Updated 1 year ago
1export function myApi(name) {
2 var sentence = "hi " + name;
3 console.email(sentence);

kelvinToCelciusmain.tsx1 match

@mutludev_•Updated 1 year ago
1export function kelvinToCelcius(kelvin) {
2 return kelvin - 273.15;
3}

myApimain.tsx1 match

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

getAvailableCoursesmain.tsx1 match

@usefulthink•Updated 1 year ago
2import { parseBlock } from "https://esm.town/v/usefulthink/parseBlock";
3
4export async function getAvailableCourses() {
5 const JSDOM = await import("npm:jsdom");
6 const qs = await import("node:querystring");

msToIsoDatemain.tsx1 match

@rwev•Updated 1 year ago
1export function msToIsoDate(unixMs) {
2 return new Date(unixMs).toISOString().split("T")[0];
3}

myApimain.tsx1 match

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