FeaturesTemplatesShowcaseTownie
AI
BlogDocsPricing
Log inSign up
std

std

parseImportMeta

Utilities for parsing import.meta.url in vals and projects
Public
Like
parseImportMeta
Home
Code
5
README.md
project
project.test
val
val.test
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
/
README.md
Code
/
README.md
Search
2/7/2025
Viewing readonly version of main branch: v79
View latest version
README.md

Utilities for parsing import.meta.url in Val Town

If you're running code in Val Town, sometimes you want to know information about the val that's running. This module has functions for that.

Usage

Project

Create val
import { parseProject } from 'https://esm.town/v/std/parseImportMeta/project' const projectVal = parseProject(import.meta.url) console.log(projectVal)

Val

Create val
import { parseVal } from 'https://esm.town/v/std/parseImportMeta/val' const val = parseVal(import.meta.url) console.log(val)

Prior art

  • https://www.val.town/v/pomdtr/extractValInfo
  • https://www.val.town/v/easrng/whoami
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareersBrandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.