MCPcopy
hub / github.com/sveltejs/svelte / clear

Method clear

packages/svelte/src/reactivity/set.js:175–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

173 }
174
175 clear() {
176 if (super.size === 0) {
177 return;
178 }
179 // Clear first, so we get nice console.log outputs with $inspect
180 super.clear();
181 var sources = this.#sources;
182
183 for (var s of sources.values()) {
184 set(s, false);
185 }
186
187 sources.clear();
188 set(this.#size, 0);
189 increment(this.#version);
190 }
191
192 keys() {
193 return this.values();

Callers

nothing calls this directly

Calls 3

setFunction · 0.90
incrementFunction · 0.90
valuesMethod · 0.45

Tested by

no test coverage detected