scitools.com

← Graph catalog

Imports is one of the interactive graphs Understand can draw of your code — call trees, dependencies, control flow, and more.

Imports

Languages: Rust, Web
Targets: Files
Variants: Classic, Cluster, Compare, Relationship, Simplified

Show what a selected JavaScript file or Rust entity imports, directly or indirectly.

For a selected JavaScript file, this shows an edge to each file it imports, then recurses into each of those files’ own imports, building a multi-level tree. For a Rust entity, this shows an edge to each entity it imports through a use statement, then recurses into each of those entities’ own imports the same way.

Rooted at app.js below, the graph shows app.js importing ui.js and data.js. ui.js imports components.js, and data.js imports components.js and api.js. components.js imports utils.js and validators.js; api.js imports utils.js. utils.js and validators.js each import constants.js, which imports nothing further. The inverse graph, Imported By, shows the reverse relationship — everything that imports the selected file or Rust entity, directly or indirectly.

See the following code and corresponding graph

// app.js
import { renderPage } from './ui.js';
import { loadData } from './data.js';

// ui.js
import { createButton, createForm } from './components.js';

// data.js
import { createForm } from './components.js';
import { fetchData } from './api.js';

// components.js
import { buildUrl } from './utils.js';
import { isValidInput } from './validators.js';

// api.js
import { buildUrl, delay } from './utils.js';

// utils.js
import { API_URL, TIMEOUT } from './constants.js';

// validators.js
import { MAX_RETRIES } from './constants.js';

// constants.js

Imports - Classic

The Classic variant is similar to the Simplified variant, showing all relationships in a simple tree, but it uses a custom layout algorithm instead of Graphviz.


Back to Imports

Imports - Cluster

The Cluster variant groups entities by their containing class/file/architecture.


Back to Imports

Imports - Compare

The Compare variant shows how the graph has changed relative to the project's comparison database.


Back to Imports

Imports - Relationship

The Relationship variant filters the graph to only paths connecting the two entities.


Back to Imports

Imports - Simplified

The Simplified variant shows all relationships in a simple tree (no clusters)


Back to Imports