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=1714&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"(4290ms)

rulemain.tsx1 match

@cescyang_service•Updated 1 year ago
1export function rule(response) {
2 const requiredApps = [
3 "55a54008ad1ba589aa210d2629c1df41",

buildHtmlmain.tsx1 match

@liamdanielduffy•Updated 1 year ago
1export function buildHtml(args: {
2 scripts?: string[];
3 styles?: string;

myApimain.tsx1 match

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

myApimain.tsx1 match

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

valmain.tsx1 match

@neverstew•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
2
3export function val({ token, id }: {
4 token?: string;
5 id: string;

runmain.tsx1 match

@pomdtr•Updated 1 year ago
2import { parseAuthorizationHeader } from "https://esm.town/v/pomdtr/parseAuthorizationHeader";
3
4export async function run(req: Request) {
5 const url = new URL(req.url);
6 const [owner, filename] = url.pathname.slice(1).split("/");

myApimain.tsx1 match

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

likePostmain.tsx1 match

@ftlsid•Updated 1 year ago
1import { ftlsid_com_likes } from "https://esm.town/v/ftlsid/ftlsid_com_likes";
2
3export async function likePost(req, res) {
4 const ip = req.ip;
5 const postURL = req.query.url;

myApimain.tsx1 match

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

getFileIndexPositionmain.tsx1 match

@andreterron•Updated 1 year ago
1export async function getFileIndexPosition({ line, col }, textContents) {
2 const lines = textContents.split("\n");
3 let position = 0;

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