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

rlesser

getDependencyGraph

Public
Like
2
getDependencyGraph
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
/
README.md
Code
/
README.md
Search
12/9/2023
Viewing readonly version of main branch: v63
View latest version
README.md

Dependency Graph Explorer

This val allows for dependency graph exploration.

getDependencyGraph

Iteratively explores the dependency graph of a val and its children, returning the results.

arguments

  • valUrlOrSlug string - the full val url or slug (author/name) of the val

returns

An object containing:

  • dependencyMap Map<string, string[]> - A map of vals (by id) to dependencies (vals or non-val id)
  • moduleMap Map<string, Module> - A map of modules (by val or non-val id) to module information. Module object contains:
    • slug string - the slug of the module, how it should be displayed visually
    • id string - the id of the module, corresponding to how it's displayed in the code, normally as a url.
    • websiteUrl string - the website link for the module, a normally a link to either valtown or npm.
    • category string|null - the category of the module, such as "valtown", "esm.sh", or "npm". Those without a predefined category are in null.

Migrated from folder: dependencyGraph/getDependencyGraph

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.