Search
![helloallan avatar](https://images.clerk.dev/oauth_github/img_2QwaDqSNTi0zxKGBRNfYGuJjGM5.jpeg)
myApi
@helloallan
An interactive, runnable TypeScript val by helloallan
Script
export function myApi(name) {
return "hi " + name;
val_Fyjpc3EX7Q
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_Fyjpc3EX7Q(req) {
try {
// Execute the code directly and capture its result
![rodrigotello avatar](https://images.clerk.dev/uploaded/img_2Q1sy7hYih37Ssro2ac4uxgyWtH.png)
hnFollowApp
@rodrigotello
HN Follow – Follow your friends on HN HN Follow lets you follow authors on Hacker News, and get email notifications when they post. It was inspired by alerthn.com and hnreplies.com. Usage Create a cron val with the a list of the people you want to follow in a JS array, like so: export const hnFollow = hnFollowApp([
"pg",
"sama",
"geoff",
"stevewoz",
"tlb",
"harj",
"alankay",
"worrydream",
"norvig",
"dalton",
"mwseibel",
"katm",
"brianchesky",
"dang",
]);
Script
import { hnEmail } from "https://esm.town/v/rodrigotello/hnEmail";
import { hnLatestPosts } from "https://esm.town/v/stevekrouse/hnLatestPosts?v=18";
export const hnFollowApp = function (authors: string[]) {
return async function ({ lastRunAt }) {
let posts = await hnLatestPosts({
authors,
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
drivingTealKite
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
export default async function (req: Request): Promise<Response> {
return Response.json({ ok: true })
myApi
@stockmaster22
An interactive, runnable TypeScript val by stockmaster22
Script
export function myApi(name) {
return "hi " + name;
![pomdtr avatar](https://images.clerk.dev/oauth_github/img_2RCoAITJZH1QencEgtVjh4Qirj4.jpeg)
fetchValInfo
@pomdtr
Usage import { fetchValInfo } from "https://esm.town/v/pomdtr/fetchValInfo"
const val = await fetchValInfo(import.meta.url)
console.log(val.id) What's the difference with extractValInfo ? @pomdtr/extractValInfo get metadata synchronously by analysing the val import url, while @pomdtr/fetchValInfo perform an http call to the val.town REST api. Only use fetchValInfo if you need some metadata that are not available from extractValInfo .
Script
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=29";
import ValTown from "npm:@valtown/sdk";
export function fetchValInfo(importMetaURL: string) {
const vt = new ValTown();
const { author, name } = extractValInfo(importMetaURL);
netsaur_xor
@loading
Approximate the XOR function using netsaur 0 xor 0 = 0.003461432410404086 (should be close to 0) 1 xor 0 = 0.9965977072715759 (should be close to 1) 0 xor 1 = 0.99673992395401 (should be close to 1) 1 xor 1 = 0.003717160550877452 (should be close to 0) try locally with the CPU backend instead
Script
# Approximate the XOR function using netsaur
0 xor 0 = 0.003461432410404086 (should be close to 0)
![politelyinvinciblepointer avatar](https://images.clerk.dev/oauth_github/img_2QJT86GzwDgYMxiCGi1zt1YlutS.png)
getfindingmyvoicecounter
@politelyinvinciblepointer
An interactive, runnable TypeScript val by politelyinvinciblepointer
Script
import { findingmyvoicecounter } from "https://esm.town/v/politelyinvinciblepointer/findingmyvoicecounter";
export function getfindingmyvoicecounter() {
return findingmyvoicecounter;
![jfbouzereau avatar](https://images.clerk.dev/oauth_github/img_2RHic3vv0mqCz4cNzxnuEUYEbQY.jpeg)
myApi
@jfbouzereau
An interactive, runnable TypeScript val by jfbouzereau
Script
export function myApi(name) {
return "hi " + name;
![gbeaver avatar](https://images.clerk.dev/oauth_github/img_2SkLu17rnMUnNRsNXMZS2zNR9dD.png)
myApi
@gbeaver
An interactive, runnable TypeScript val by gbeaver
Script
export function myApi(name) {
return "hi " + name;
val_cQJBY4pJHz
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_cQJBY4pJHz(req) {
try {
// Execute the code directly and capture its result
![carlvonblixen avatar](https://images.clerk.dev/oauth_github/img_2Sb4YIkmpRKfzUbdbldKL5IWn3I.jpeg)
myApi
@carlvonblixen
An interactive, runnable TypeScript val by carlvonblixen
Script
export function myApi(name) {
return "hi " + name;
myApi
@hankenstein
An interactive, runnable TypeScript val by hankenstein
Script
export function myApi(name) {
return "hi " + name;