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/$1?q=api&page=1434&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=api

Returns an array of strings in format "username" or "username/projectName"

Found 17994 results for "api"(1816ms)

celinewaitlistmain.tsx1 match

@mbo•Updated 8 months ago
1/**
2 * This Val creates a simple API endpoint that saves an email address for notifications
3 * using Val Town's JSON storage. It handles POST requests to save the submitted email
4 * and returns a simple confirmation message.

wed18_09_2024main.tsx2 matches

@hideokun•Updated 8 months ago
9type Y = Ex<1 | 2 | 3 | "a" | "b" | "c", "a" | "c">;
10
11type T = Capitalize<"asdf">;
12
13type TT = Uncapitalize<"AAA">;
14
15//

axiomNotifierREADME.md1 match

@campsite•Updated 8 months ago
1This webhook handler sends messages in the specificed thread in response to events from [Axiom](https://axiom.co), a log monitoring service,
2
3Campsite API Documentation: https://campsite.com/docs

openapi_playgroundmain.tsx4 matches

@stainless_em•Updated 8 months ago
10} from "https://deno.land/x/hono@v4.0.10/jsx/index.ts";
11import { Hono } from "https://deno.land/x/hono@v4.0.10/mod.ts";
12import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
13import { create } from "https://esm.town/v/websandbox/create";
14import * as YAML from "jsr:@std/yaml";
63 );
64 return (
65 <Layout title="OpenAPI Playground">
66 <style>
67 {String.raw`
231 }
232 } else {
233 code = `# Paste your OpenAPI spec here`;
234 }
235 }
238});
239function template(code: string) {
240 return `import { makeServer } from "https://esm.town/v/stainless_em/openapiPlaygroundServer"\nexport default makeServer(${
241 JSON.stringify(YAML.parse(code))
242 })`;

runmain.tsx2 matches

@websandbox•Updated 8 months ago
1import { getMainExport } from "https://esm.town/v/easrng/oldstyleUtil?v=1";
2import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
3import { blob } from "https://esm.town/v/std/blob?v=11";
4import { decodeBase64, encodeBase64 } from "jsr:@std/encoding@0.219.1/base64";
28 });
29 const start = performance.now();
30 const res = await fetch(API_URL + "/v1/eval", {
31 method: "POST",
32 body: JSON.stringify({

createAPImain.tsx1 match

@websandbox•Updated 8 months ago
48 privacy: "unlisted",
49 });
50 await fetch("https://www.val.town/api/trpc/updateVal", {
51 headers: {
52 "content-type": "application/json",

openapi_playgroundREADME.md2 matches

@stainless_em•Updated 8 months ago
1# openapi playground
2temporarily host swagger and prism for your openapi spec

primeTurquoiseTernREADME.md1 match

@phyllislim•Updated 8 months ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

aqiREADME.md1 match

@phyllislim•Updated 8 months ago
8
91. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12

passwordGenmain.tsx8 matches

@prashamtrivedi•Updated 8 months ago
8 const [policy, setPolicy] = useState({
9 minLength: 8,
10 requireCapital: true,
11 requireSpecial: true,
12 allowedSpecial: "!@#$%^&*()_+-=[]{}|;:,.<>?",
105 <input
106 type="checkbox"
107 id="requireCapital"
108 checked={policy.requireCapital}
109 onChange={(e) => setPolicy({ ...policy, requireCapital: e.target.checked })}
110 className="mr-2"
111 />
112 <label htmlFor="requireCapital">Require Capital Letter</label>
113 </div>
114 <div className="flex items-center">
176 <ul className="list-disc list-inside ml-4 space-y-1">
177 <li>Set the minimum password length</li>
178 <li>Choose whether to require a capital letter</li>
179 <li>Choose whether to require a special character</li>
180 <li>Specify allowed special characters</li>
295 });
296
297 // Ensure capital letter if required
298 if (policy.requireCapital && !/[A-Z]/.test(password)) {
299 const index = Math.floor(Math.random() * password.length);
300 password = password.slice(0, index) + password[index].toUpperCase() + password.slice(index + 1);

Apiify6 file matches

@wolf•Updated 1 hour ago

dailyQuoteAPI

@Souky•Updated 2 days ago
Kapil01
apiv1