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/?q=function&page=736&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 7802 results for "function"(350ms)

getWeatherREADME.md1 match

@charmaine•Updated 2 months ago
1## Get Weather
2
3Simple function to get weather data from the free [wttr.in](https://wttr.in/:help) service.
4
5```ts

getWeathermain.tsx1 match

@charmaine•Updated 2 months ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export async function getWeather(location: string): Promise<WeatherResponse> {
4 return fetchJSON(`https://wttr.in/${location}?format=j1`);
5}

runGetWeathermain.tsx1 match

@charmaine•Updated 2 months ago
1import { getWeather } from "https://esm.town/v/stevekrouse/getWeather";
2
3export default async function(interval: Interval) {
4 let weather = await getWeather("Brooklyn, NY");
5 console.log(weather.current_condition[0].FeelsLikeF);

APIBuilderTemplatefocusedCoffeeClam1 match

@dcm31•Updated 2 months ago
3import "swagger-ui-dist/swagger-ui.css";
4
5export default async function (req: Request): Promise<Response> {
6 const ui = SwaggerUI({
7 url: "https://petstore.swagger.io/v2/swagger.json",

APIBuilderTemplatefieryYellowHornet1 match

@dcm31•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

APIBuilderTemplatequickMoccasinGoldfish1 match

@dcm31•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

APIBuilderTemplatesprightlyBrownFox1 match

@dcm31•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

APIBuilderTemplatelaudableSapphireDog1 match

@dcm31•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

APIBuilderTemplatespectacularBlushFelidae1 match

@dcm31•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

APIBuilderTemplatehappyIvoryPorcupine1 match

@dcm31•Updated 2 months ago
1export default async function (req: Request): Promise<Response> {
2 return Response.json({ ok: true })
3}

getFileEmail4 file matches

@shouser•Updated 6 days ago
A helper function to build a file's email

TwilioHelperFunctions

@vawogbemi•Updated 2 months ago