Home / Function/ get_inspect_args() — svelte Function Reference

get_inspect_args() — svelte Function Reference

Architecture documentation for the get_inspect_args() function in utils.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  57534fa7_7bfd_c029_75ae_4c5950d5e65c["get_inspect_args()"]
  f3fad5a9_6b91_ed4f_9331_7f9fc18491c3["utils.js"]
  57534fa7_7bfd_c029_75ae_4c5950d5e65c -->|defined in| f3fad5a9_6b91_ed4f_9331_7f9fc18491c3
  8a66cd2b_336a_f7a6_9338_189e5aa481fb["transform_inspect_rune()"]
  8a66cd2b_336a_f7a6_9338_189e5aa481fb -->|calls| 57534fa7_7bfd_c029_75ae_4c5950d5e65c
  2b2701d7_6862_c3e7_cf6f_c1178e1b956b["CallExpression()"]
  2b2701d7_6862_c3e7_cf6f_c1178e1b956b -->|calls| 57534fa7_7bfd_c029_75ae_4c5950d5e65c
  style 57534fa7_7bfd_c029_75ae_4c5950d5e65c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/3-transform/utils.js lines 440–451

export function get_inspect_args(rune, node, visit) {
	const call =
		rune === '$inspect'
			? node
			: /** @type {CallExpression} */ (/** @type {MemberExpression} */ (node.callee).object);

	return {
		args: call.arguments.map((arg) => /** @type {Expression} */ (visit(arg))),
		inspector:
			rune === '$inspect' ? 'console.log' : /** @type {Expression} */ (visit(node.arguments[0]))
	};
}

Domain

Subdomains

Frequently Asked Questions

What does get_inspect_args() do?
get_inspect_args() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/3-transform/utils.js.
Where is get_inspect_args() defined?
get_inspect_args() is defined in packages/svelte/src/compiler/phases/3-transform/utils.js at line 440.
What calls get_inspect_args()?
get_inspect_args() is called by 2 function(s): CallExpression, transform_inspect_rune.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free