FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
pomdtr
pomdtrfetchValInfo
Public
Like
1
fetchValInfo
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 miliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Usage

Create val
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.

Code
README.mdmain.tsx
Go to top
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Product
FeaturesPricing
Developers
DocsStatusAPI ExamplesNPM Package Examples
Explore
ShowcaseTemplatesNewest ValsTrending ValsNewsletter
Company
AboutBlogCareersBrandhi@val.town
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.