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/$2?q=function&page=2340&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 24101 results for "function"(4250ms)

untitled_return_me_secretmain.tsx1 match

@stevekrouse•Updated 1 year ago
1import process from "node:process";
2
3export function untitled_return_me_secret() {
4 return process.env.test;
5}

pingReplitmain.tsx1 match

@paperee•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function pingReplit() {
4 fetch("https://bed.paperee.repl.co/");
5 fetch("https://school-work.paperee.repl.co/");

myApimain.tsx1 match

@tangshengnan•Updated 1 year ago
1export function myApi(req, res) {
2 res.set("Content-Type", "application/json");
3 res.send([{ value: "wangtianbao", url: "https://www.967111.net" }]);

getrantcountermain.tsx1 match

@politelyinvinciblepointer•Updated 1 year ago
1import { rantcounter } from "https://esm.town/v/politelyinvinciblepointer/rantcounter";
2
3export function getrantcounter() {
4 return rantcounter;
5}
1let { johnnycashtodolistcounter } = await import("https://esm.town/v/politelyinvinciblepointer/johnnycashtodolistcounter");
2
3export function increasejohnnycashtodolistcounter() {
4 johnnycashtodolistcounter++;
5}

srdacanPozdravmain.tsx1 match

@vlada•Updated 1 year ago
1export function srdacanPozdrav(name) {
2 return "Zdravo, " + name;
3}

countdownmain.tsx1 match

@ion•Updated 1 year ago
1export async function countdown(req: express.Request, res: express.Response) {
2 // Target Time
3 // const target_time = req.params.time ?? ;

valFormmain.tsx4 matches

@rodrigotello•Updated 1 year ago
1export function valForm(functionIWantIntoAForm) {
2 let inputFields = "";
3 for (let i = 0; i < functionIWantIntoAForm.length; i++) {
4 inputFields += `<input type="text" id="input${i}" name="input${i}"><br>`;
5 }
11 <p id="result"></p>
12 <script>
13 document.getElementById('myForm').addEventListener('submit', function(event) {
14 event.preventDefault();
15
17 const args = Array.from(formData.values()).map(Number);
18
19 fetch('https://api.val.town/v1/run/rodrigotello.multiplicationFunctionTest', {
20 method: 'POST',
21 headers: { 'Content-Type': 'application/json' },

peelSessionArtistsmain.tsx1 match

@aeaton•Updated 1 year ago
1import { fetchHtmlDom } from "https://esm.town/v/aeaton/fetchHtmlDom";
2
3export async function peelSessionArtists(url) {
4 const dom = await fetchHtmlDom(url);
5 const items = dom.querySelectorAll(".link-list > li > a");

pollRSSFeedsmain.tsx1 match

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

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
tuna

tuna8 file matches

@jxnblk•Updated 1 month 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.