• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
begoon

begoon

thisval

Public
Like
3
thisval
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

This val default exports a function returning ValInfo.

The val information comes from the Deno stack trace induced by throw new Error().

type ValInfo = {
  stack: string[]; // mostly for debugging
  endpoint: string; // val endpoint URL, empty if it is not an HTTP val
  user: string; // val.town user name
  name: string; // val name
};

Here is an example program:

import thisval from "https://esm.town/v/begoon/thisval";
const val = thisval();
export default async function(req: Request): Promise<Response> {
  return Response.json(val);
}

when invoked, it returns:

{
  "stack": [
    "Error",
    "    at info (https://esm.town/v/begoon/thisval?v=12:10:11)",
    "    at https://esm.town/v/begoon/thisvaltest?v=2:3:13"
  ],
  "endpoint": "begoon-thisvaltest.web.val.run",
  "user": "begoon",
  "name": "thisvaltest"
}
Code
README.mdmain.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.