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=1364&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 18363 results for "function"(2344ms)

val_7lBwh14Ivcmain.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_exYw7USixLmain.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 a;}
6fibonacci();
7 })();

val_ha4AaveNX7main.tsx2 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++) {

val_6mHf5OkPYVmain.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() { let a = 0, b = 1; let lowestThreeDigit; while (b < 1000) { let temp = b; b = a + b; a = temp; } lowestThreeDigit = b; return lowestThreeDigit;}
6findLowestThreeDigitFibonacci();
7 })();

val_f82nThdwYOmain.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_ZiSgmpYhg6main.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;}
6fibonacci();
7 })();

val_DDT4GSkTOzmain.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_A2hBhiEmppmain.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 let result = [];

val_HhH0AK0vuPmain.tsx2 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++) {

val_8omNGabJ8Gmain.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 fib = [0, 1];
7 let nextFib = 1;

getFileEmail4 file matches

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

tuna8 file matches

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