Home / Function/ REPLACE() — svelte Function Reference

REPLACE() — svelte Function Reference

Architecture documentation for the REPLACE() function in url-search-params.js from the svelte codebase.

Entity Profile

Dependency Diagram

graph TD
  b48043f5_5a93_dc20_5376_9a775073fc34["REPLACE()"]
  0a948943_ab4c_5a17_8110_53e6ebf727dd["SvelteURLSearchParams"]
  b48043f5_5a93_dc20_5376_9a775073fc34 -->|defined in| 0a948943_ab4c_5a17_8110_53e6ebf727dd
  b85d32bb_280f_9f13_e65a_9a77e8f6661e["keys()"]
  b48043f5_5a93_dc20_5376_9a775073fc34 -->|calls| b85d32bb_280f_9f13_e65a_9a77e8f6661e
  a534d001_d784_dabd_d365_9f306868f2c3["append()"]
  b48043f5_5a93_dc20_5376_9a775073fc34 -->|calls| a534d001_d784_dabd_d365_9f306868f2c3
  7602fc38_fab9_8955_83f0_8643d7c6c7a4["increment()"]
  b48043f5_5a93_dc20_5376_9a775073fc34 -->|calls| 7602fc38_fab9_8955_83f0_8643d7c6c7a4
  style b48043f5_5a93_dc20_5376_9a775073fc34 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/svelte/src/reactivity/url-search-params.js lines 55–69

	[REPLACE](params) {
		if (this.#updating) return;
		this.#updating = true;

		for (const key of [...super.keys()]) {
			super.delete(key);
		}

		for (const [key, value] of params) {
			super.append(key, value);
		}

		increment(this.#version);
		this.#updating = false;
	}

Subdomains

Frequently Asked Questions

What does REPLACE() do?
REPLACE() is a function in the svelte codebase, defined in packages/svelte/src/reactivity/url-search-params.js.
Where is REPLACE() defined?
REPLACE() is defined in packages/svelte/src/reactivity/url-search-params.js at line 55.
What does REPLACE() call?
REPLACE() calls 3 function(s): append, increment, keys.

Analyze Your Own Codebase

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

Try Supermodel Free