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=1705&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 18165 results for "function"(2746ms)

myApimain.tsx1 match

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

updateISBNFilemain.tsx1 match

@octref•Updated 1 year ago
2import { ghContent } from "https://esm.town/v/octref/ghContent";
3
4export async function updateISBNFile(isbn: string) {
5 const ISBN_PATH = "data/mine/books-isbn.json";
6 const content = await ghContent(ISBN_PATH);

myApimain.tsx1 match

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

nearestOpenStationmain.tsx1 match

@guscuddy•Updated 1 year ago
4 lon = +lon;
5 lat = +lat;
6 function dist(station) {
7 return Math.sqrt(
8 Math.pow(station.lat - lat, 2) + Math.pow(station.lon - lon, 2),

myReactComponentmain.tsx1 match

@liamdanielduffy•Updated 1 year ago
1// assumes React is in scope, and returns a valid HTML script string for rendering a React Component
2export function myReactComponent() {
3 return `
4const Example = () => {

arraysAreIdenticalmain.tsx1 match

@g000m•Updated 1 year ago
1export function arraysAreIdentical(arr1, arr2) {
2 if (arr1.length !== arr2.length) {
3 return false;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

convertmain.tsx1 match

@dean•Updated 1 year ago
1export function convert(number, fromUnit, toUnit) {
2 const conversionRates = {
3 // Length

myApimain.tsx1 match

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