MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / reset

Method reset

src/lib/settings.js:337–351  ·  view source on GitHub ↗
(setting)

Source from the content-addressed store, hash-verified

335 }
336
337 async reset(setting) {
338 if (setting) {
339 if (setting in this.#defaultSettings) {
340 this.value[setting] = this.#defaultSettings[setting];
341 await this.update();
342 } else {
343 return false;
344 }
345 } else {
346 this.value = this.#defaultSettings;
347 await this.update(false);
348 }
349
350 this.#on.reset.forEach((onreset) => onreset(this.value));
351 }
352
353 /**
354 * Adds a listener for the given event

Callers 4

initMethod · 0.95
customTheme.jsFile · 0.80
callbackFunction · 0.80
index.jsFile · 0.80

Calls 1

updateMethod · 0.95

Tested by

no test coverage detected