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/image-url.jpg?q=api&page=1505&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 17652 results for "api"(3356ms)

jsrmain.tsx1 match

@vladimyr•Updated 1 year ago
1// SPDX-License-Identifier: 0BSD
2import { getConfig } from "https://esm.town/v/vladimyr/jsrApi";
3import { newValURL } from "https://esm.town/v/vladimyr/newValURL";
4import { type HtmlProcessor, serveReadme } from "https://esm.town/v/vladimyr/serveReadme";

echomain.tsx1 match

@curtcox•Updated 1 year ago
14 "redirect": req.redirect,
15 "searchParams": Object.fromEntries(searchParams.entries()),
16 "docs": "https://developer.mozilla.org/en-US/docs/Web/API/Request",
17 });
18};

jsrApi_examplemain.tsx5 matches

@vladimyr•Updated 1 year ago
1// SPDX-License-Identifier: 0BSD
2import * as jsrApi from "https://esm.town/v/vladimyr/jsrApi";
3
4const latest = await jsrApi.getLatestVersion("valibot", "valibot");
5console.log(latest);
6// ==> >=0.30.0
7
8const manifest = await jsrApi.getManifest("@valibot", "valibot", "0.30.0");
9console.log(manifest["/jsr.json"].checksum);
10// ==> sha256-d76f30c31d6700f06ff4bc0e1cf508de87e5bad348d75dbadb6376fee4359d90
11
12// @see: https://jsr.io/@valibot/valibot/0.30.0/jsr.json
13const pkgConfig = await jsrApi.getConfig("valibot", "valibot", "0.30.0");
14console.log(pkgConfig);
15// ==> { name: "@valibot/valibot", version: "0.30.0" }
20{
21 // @see: https://jsr.io/@mark/html/1.0.0/deno.json
22 const pkgConfig = await jsrApi.getConfig("mark", "html", "1.0.0");
23 console.log(pkgConfig);
24 // ==> { name: "@mark/html", version: "1.0.0" }

jsrApimain.tsx2 matches

@vladimyr•Updated 1 year ago
13];
14
15// @see: https://jsr.io/docs/api#package-metadata
16const PkgMetaSchema = v.object({
17 scope: v.string(),
20});
21
22// @see: https://jsr.io/docs/api#package-version-metadata
23const PkgVerMetaSchema = v.object({
24 manifest: v.record(

jsrApi_exampleREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: jsr/jsrApi_example

jsrApiREADME.md1 match

@vladimyr•Updated 1 year ago
1Migrated from folder: jsr/jsrApi

CS1200main.tsx1 match

@parkddongddoong•Updated 1 year ago
4async function fetchRandomJoke() {
5 const response = await fetch(
6 "https://official-joke-api.appspot.com/random_joke",
7 );
8 return response.json();

gsheet_callmain.tsx2 matches

@hiteshjoshi•Updated 1 year ago
6 );
7 const googleAuthOptions = {
8 scope: ["https://www.googleapis.com/auth/spreadsheets"],
9 };
10 const token = await getToken(service_account, googleAuthOptions);
11 const result = fetchJSON(
12 `https://sheets.googleapis.com/v4/spreadsheets/${sheet_id}/${action}`,
13 {
14 method,

fetchValmain.tsx2 matches

@vladimyr•Updated 1 year ago
1// SPDX-License-Identifier: 0BSD
2import { API_URL } from "https://esm.town/v/std/API_URL?v=5";
3import ky from "npm:ky";
4import * as v from "npm:valibot";
25
26export async function fetchVal(author: string, name: string) {
27 const prefixUrl = new URL("/v1/alias", API_URL);
28 const resp = await ky.get(`${author}/${name}`, { prefixUrl }).json();
29 return v.parse(ValSchema, resp);

codemirror_demoREADME.md1 match

@edjw•Updated 1 year ago
8- [theme](https://github.com/vadimdemedes/thememirror/tree/main/source/themes)
9
10## API
11
12You can access the code using the `code` property:

RandomQuoteAPI

@Freelzy•Updated 1 day ago

HAPI7 file matches

@dIgitalfulus•Updated 1 day ago
apiry
Kapil01