Home / Function/ is_function() — svelte Function Reference

is_function() — svelte Function Reference

Architecture documentation for the is_function() function in scope.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  f10026d2_055e_88d6_ace4_e4f662b54259["is_function()"]
  081337ba_de52_5c6a_048c_b2c15432ee87["Binding"]
  f10026d2_055e_88d6_ace4_e4f662b54259 -->|defined in| 081337ba_de52_5c6a_048c_b2c15432ee87
  5c01291d_15ff_bab3_2463_d54766affbf6["Identifier()"]
  5c01291d_15ff_bab3_2463_d54766affbf6 -->|calls| f10026d2_055e_88d6_ace4_e4f662b54259
  style f10026d2_055e_88d6_ace4_e4f662b54259 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/compiler/phases/scope.js lines 175–189

	is_function() {
		if (this.updated) {
			// even if it's reassigned to another function,
			// we can't use it directly as e.g. an event handler
			return false;
		}

		const type = this.initial?.type;

		return (
			type === 'ArrowFunctionExpression' ||
			type === 'FunctionExpression' ||
			type === 'FunctionDeclaration'
		);
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does is_function() do?
is_function() is a function in the svelte codebase, defined in packages/svelte/src/compiler/phases/scope.js.
Where is is_function() defined?
is_function() is defined in packages/svelte/src/compiler/phases/scope.js at line 175.
What calls is_function()?
is_function() is called by 1 function(s): Identifier.

Analyze Your Own Codebase

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

Try Supermodel Free