Home / Function/ of() — svelte Function Reference

of() — svelte Function Reference

Architecture documentation for the of() function in tweened.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  55807212_ec7e_a41c_d7c1_e4936fc3b4bd["of()"]
  97ee19d7_08c4_87a4_93c0_06e41fb303a5["Tween"]
  55807212_ec7e_a41c_d7c1_e4936fc3b4bd -->|defined in| 97ee19d7_08c4_87a4_93c0_06e41fb303a5
  eba6d905_b0bc_b5a4_beb4_5636a78d57a5["set()"]
  55807212_ec7e_a41c_d7c1_e4936fc3b4bd -->|calls| eba6d905_b0bc_b5a4_beb4_5636a78d57a5
  style 55807212_ec7e_a41c_d7c1_e4936fc3b4bd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/motion/tweened.js lines 221–229

	static of(fn, options) {
		const tween = new Tween(fn(), options);

		render_effect(() => {
			tween.set(fn());
		});

		return tween;
	}

Subdomains

Calls

Frequently Asked Questions

What does of() do?
of() is a function in the svelte codebase, defined in packages/svelte/src/motion/tweened.js.
Where is of() defined?
of() is defined in packages/svelte/src/motion/tweened.js at line 221.
What does of() call?
of() calls 1 function(s): set.

Analyze Your Own Codebase

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

Try Supermodel Free