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

Method delete

packages/svelte/src/reactivity/map.js:196–212  ·  view source on GitHub ↗

@param {K} key

(key)

Source from the content-addressed store, hash-verified

194
195 /** @param {K} key */
196 delete(key) {
197 var sources = this.#sources;
198 var s = sources.get(key);
199 var res = super.delete(key);
200
201 if (s !== undefined) {
202 sources.delete(key);
203 set(s, -1);
204 }
205
206 if (res) {
207 set(this.#size, super.size);
208 increment(this.#version);
209 }
210
211 return res;
212 }
213
214 clear() {
215 if (super.size === 0) {

Callers 15

map.test.tsFile · 0.45
set.test.tsFile · 0.45
url.test.tsFile · 0.45
constructorMethod · 0.45
analyze_componentFunction · 0.45
visitFunction · 0.45
subscribeFunction · 0.45
getFunction · 0.45
run_tasksFunction · 0.45
abortFunction · 0.45
_mountFunction · 0.45

Calls 3

setFunction · 0.90
incrementFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected