MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / set

Method set

modules/data/url/url.js:172–179  ·  view source on GitHub ↗
(name, value)

Source from the content-addressed store, hash-verified

170 return pair ? true : false;
171 }
172 set(name, value) {
173 const pair = this.#pairs.find(pair => pair.name == name);
174 if (pair)
175 pair.value = value;
176 else
177 this.#pairs.push({ name, value });
178 this.updateParts();
179 }
180 toString() {
181 return serializeQuery(this.#pairs);
182 }

Callers

nothing calls this directly

Calls 3

updatePartsMethod · 0.95
findMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected