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=1456&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 19265 results for "function"(1210ms)

val_FHkXzjGb1tmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function findLowestThreeDigitFibonacci() {
6 let a = 0, b = 1;
7 let lowestThreeDigitFibonacci = 0;

val_QEZMJDAFaFmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function isPrime(num) {
6 if (num <= 1) return false;
7 for (let i = 2; i <= Math.sqrt(num); i++) {
11}
12
13function findLowestThreeDigitPrime() {
14 for (let num = 100; num < 1000; num++) {
15 if (isPrime(num)) {

val_6wxw8ODY78main.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function fibonacci() {
6 let a = 0, b = 1;
7 while (b < 1000) {

val_CMNAhvMXEqmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function isPrime(num) {
6 if (num <= 1) return false;
7 for (let i = 2; i <= Math.sqrt(num); i++) {
11}
12
13function findLowestThreeDigitPrime() {
14 for (let num = 100; num < 1000; num++) {
15 if (isPrime(num)) {

val_fM7f5WnH8fmain.tsx1 match

@dhvanil•Updated 6 months ago
1export default async function handler(req) {
2 try {
3 return Response.json({ success: true });

val_lg7edVgoMtmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function fibonacci() { let a = 0, b = 1; let fibNumbers = []; while (b < 1000) { if (b >= 100) fibNumbers.push(b); let temp = b; b = a + b; a = temp; } return fibNumbers.slice(0, 3);}
6
7fibonacci();

val_gDdiNE0LvMmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function fibonacci() { let a = 0, b = 1; let result = []; while (b < 1000) { result.push(b); let temp = b; b = a + b; a = temp; } return result.filter(num => num >= 100 && num < 1000);}
6
7fibonacci();

val_wdRvdd0aOOmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function isPrime(num) {
6 if (num <= 1) return false;
7 for (let i = 2; i <= Math.sqrt(num); i++) {
11}
12
13function findLowestThreeDigitPrime() {
14 for (let num = 100; num < 1000; num++) {
15 if (isPrime(num)) {

val_E1oovKNSVpmain.tsx2 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function fibonacci() { let a = 0, b = 1; while (b < 1000) { let temp = b; b = a + b; a = temp; } return b;}
6
7fibonacci();

val_6ob0t5Fmjmmain.tsx3 matches

@dhvanil•Updated 6 months ago
1
2 export default async function handler(req) {
3 try {
4 const result = await (async () => {
5 function isPrime(num) {
6 if (num <= 1) return false;
7 for (let i = 2; i <= Math.sqrt(num); i++) {
11}
12
13function findLowestThreeDigitPrime() {
14 for (let num = 100; num < 1000; num++) {
15 if (isPrime(num)) {

getFileEmail4 file matches

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

tuna8 file matches

@jxnblk•Updated 3 weeks 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.