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

Method #getChangedKeys

src/lib/settings.js:386–399  ·  view source on GitHub ↗

* Returns changed settings * @returns {Array }

()

Source from the content-addressed store, hash-verified

384 * @returns {Array<String>}
385 */
386 #getChangedKeys() {
387 if (!this.#oldSettings) return [];
388 const keys = [];
389 Object.keys(this.#oldSettings).forEach((key) => {
390 const value = this.#oldSettings[key];
391 if (typeof value === "object") {
392 if (!areEqual(value, this.value[key])) keys.push(key);
393 return;
394 }
395
396 if (value !== this.value[key]) keys.push(key);
397 });
398 return keys;
399 }
400
401 #applySettings(setting) {
402 switch (setting) {

Callers 1

updateMethod · 0.95

Calls 1

areEqualFunction · 0.85

Tested by

no test coverage detected