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