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/$%7Burl%7D?q=function&page=1819&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 18400 results for "function"(2639ms)

daysUntilmain.tsx1 match

@shanberg•Updated 1 year ago
1export function daysUntil(date) {
2 // console.log("run");
3 // console.log(date);

myApimain.tsx1 match

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

hashmailmain.tsx1 match

@jdan•Updated 1 year ago
2import { sha256OfText } from "https://esm.town/v/jdan/sha256OfText";
3
4export async function hashmail(e: {
5 from: string;
6 to: string[];

duckDBmain.tsx1 match

@hamilton•Updated 1 year ago
1export async function duckDB(url) {
2 const { Database } = await import("npm:duckdb-async");
3 const db = await Database.create(":memory:");

myApimain.tsx1 match

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

Snakemain.tsx1 match

@adamgonda•Updated 1 year ago
1export function Snake({ x, y, dir }) {
2 return {
3 body: [

updatemain.tsx1 match

@adamgonda•Updated 1 year ago
2import { pipe } from "https://esm.town/v/adamgonda/pipe";
3
4export function update({ state, input }) {
5 const newState = pipe(state)(
6 // turnSnake(input),

aqimain.tsx1 match

@raei•Updated 1 year ago
1import { easyAQI } from "https://esm.town/v/stevekrouse/easyAQI?v=3";
2
3export async function aqi(location = "Berlin") {
4 const data = await easyAQI({ location });
5 if (data.severity.includes("Unhealthy")) {

myApimain.tsx1 match

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

formatCurrentDatetimeSentencemain.tsx1 match

@wilt•Updated 1 year ago
1// Outputs, e.g., "It is currently Sunday, May 21, 2023 at 12:11:04 PM Pacific Daylight Time."
2// timeZone should be a tz identifier as listed at https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
3export function formatCurrentDatetimeSentence(timeZone: string): string {
4 const dateFormatter = new Intl.DateTimeFormat([], {
5 dateStyle: "full",

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
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": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.