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/$%7Bsuccess?q=function&page=2820&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 29109 results for "function"(1972ms)

generateColormain.tsx1 match

@rodrigotello•Updated 1 year ago
1import { convertRGBToHex } from "https://esm.town/v/rodrigotello/convertRGBToHex";
2
3export function generateColor(cssColorObject) {
4 return `#${
5 Object.values(cssColorObject)

myApimain.tsx1 match

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

getCNNNewsmain.tsx1 match

@fab1an•Updated 1 year ago
1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getCNNNews() {
4 const response = await fetch(
5 "https://saurav.tech/NewsAPI/everything/cnn.json"

myApimain.tsx1 match

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

myApimain.tsx1 match

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

getTelAvivMobilitySpotsmain.tsx1 match

@rustyb•Updated 1 year ago
6 features: unknown[];
7}
8export async function getTelAvivMobilitySpots() {
9 // const url =
10 // "https://gisn.tel-aviv.gov.il/arcgis/rest/services/IView2/MapServer/860/query?where=1=1&outFields=*&f=geojson";

serveReactDemomain.tsx1 match

@liamdanielduffy•Updated 1 year ago
2import { serveAsHTML } from "https://esm.town/v/liamdanielduffy/serveAsHTML";
3
4export function serveReactDemo(req, res) {
5 serveAsHTML(req, res, reactDemo());
6}

reactDemomain.tsx1 match

@liamdanielduffy•Updated 1 year ago
2import { buildHtml } from "https://esm.town/v/liamdanielduffy/buildHtml";
3
4export function reactDemo() {
5 return buildHtml(addReactFromCDN(), "");
6}

toPercentChangemain.tsx1 match

@rwev•Updated 1 year ago
1export function toPercentChange(initialValue, currentValue) {
2 return `${((currentValue / initialValue - 1) * 100).toPrecision(2)}%`;
3}

polygonTickerSummarymain.tsx1 match

@rwev•Updated 1 year ago
4import { polygonPriceOnWeekdayMsAgo } from "https://esm.town/v/rwev/polygonPriceOnWeekdayMsAgo";
5
6export async function polygonTickerSummary(ticker) {
7 return {
8 day: await polygonPriceOnWeekdayMsAgo(
tuna

tuna9 file matches

@jxnblk•Updated 1 day ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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.