Search

Results include substring matches and semantically similar vals. Learn more
helloallan avatar
myApi
@helloallan
An interactive, runnable TypeScript val by helloallan
Script
export function myApi(name) {
return "hi " + name;
dhvanil avatar
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
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
drivingTealKite
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
export default async function (req: Request): Promise<Response> {
return Response.json({ ok: true })
stockmaster22 avatar
myApi
@stockmaster22
An interactive, runnable TypeScript val by stockmaster22
Script
export function myApi(name) {
return "hi " + name;
pomdtr avatar
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);
loading avatar
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
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
myApi
@jfbouzereau
An interactive, runnable TypeScript val by jfbouzereau
Script
export function myApi(name) {
return "hi " + name;
gbeaver avatar
myApi
@gbeaver
An interactive, runnable TypeScript val by gbeaver
Script
export function myApi(name) {
return "hi " + name;
dhvanil avatar
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
myApi
@carlvonblixen
An interactive, runnable TypeScript val by carlvonblixen
Script
export function myApi(name) {
return "hi " + name;
hankenstein avatar
myApi
@hankenstein
An interactive, runnable TypeScript val by hankenstein
Script
export function myApi(name) {
return "hi " + name;
dhvanil avatar
val_TYVIbC24sU
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_TYVIbC24sU(req) {
try {
// Execute the code directly and capture its result
deadlystudio avatar
myApi
@deadlystudio
An interactive, runnable TypeScript val by deadlystudio
Script
export function myApi(name) {
return "hi " + name;