Home / Function/ get() — svelte Function Reference

get() — svelte Function Reference

Architecture documentation for the get() function in map.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  0ad1774b_99d2_2c89_1068_0a26e5151b9a["get()"]
  f49779c1_f219_37b0_968a_883379ecd32c["SvelteMap"]
  0ad1774b_99d2_2c89_1068_0a26e5151b9a -->|defined in| f49779c1_f219_37b0_968a_883379ecd32c
  a08b6cc5_af73_1be4_d02f_3113cf8a8305["get()"]
  0ad1774b_99d2_2c89_1068_0a26e5151b9a -->|calls| a08b6cc5_af73_1be4_d02f_3113cf8a8305
  1e2f7428_6050_5cb7_69db_bf5db719f6d1["source()"]
  0ad1774b_99d2_2c89_1068_0a26e5151b9a -->|calls| 1e2f7428_6050_5cb7_69db_bf5db719f6d1
  4dfcf957_8573_ff55_bd31_4181227109e3["tag()"]
  0ad1774b_99d2_2c89_1068_0a26e5151b9a -->|calls| 4dfcf957_8573_ff55_bd31_4181227109e3
  d2a90b1f_8427_2d4f_9666_54818c307da5["label()"]
  0ad1774b_99d2_2c89_1068_0a26e5151b9a -->|calls| d2a90b1f_8427_2d4f_9666_54818c307da5
  c4654be9_603f_7b49_e404_23ea06eb0af5["set()"]
  0ad1774b_99d2_2c89_1068_0a26e5151b9a -->|calls| c4654be9_603f_7b49_e404_23ea06eb0af5
  ff991bf8_6eb2_99d4_111b_79e03d3bdc70["keys()"]
  0ad1774b_99d2_2c89_1068_0a26e5151b9a -->|calls| ff991bf8_6eb2_99d4_111b_79e03d3bdc70
  4176dd08_b6e9_0359_b4b0_bd7bf7ff3d2d["has()"]
  0ad1774b_99d2_2c89_1068_0a26e5151b9a -->|calls| 4176dd08_b6e9_0359_b4b0_bd7bf7ff3d2d
  style 0ad1774b_99d2_2c89_1068_0a26e5151b9a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/reactivity/map.js lines 132–156

	get(key) {
		var sources = this.#sources;
		var s = sources.get(key);

		if (s === undefined) {
			var ret = super.get(key);
			if (ret !== undefined) {
				s = this.#source(0);

				if (DEV) {
					tag(s, `SvelteMap get(${label(key)})`);
				}

				sources.set(key, s);
			} else {
				// We should always track the version in case
				// the Set ever gets this value in the future.
				get(this.#version);
				return undefined;
			}
		}

		get(s);
		return super.get(key);
	}

Subdomains

Frequently Asked Questions

What does get() do?
get() is a function in the svelte codebase, defined in packages/svelte/src/reactivity/map.js.
Where is get() defined?
get() is defined in packages/svelte/src/reactivity/map.js at line 132.
What does get() call?
get() calls 7 function(s): get, has, keys, label, set, source, tag.

Analyze Your Own Codebase

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

Try Supermodel Free