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

Method isUpdated

src/lib/installState.js:76–90  ·  view source on GitHub ↗

* * @param {string} url * @param {ArrayBuffer | string} content * @param {boolean} isString * @returns

(url, content)

Source from the content-addressed store, hash-verified

74 * @returns
75 */
76 async isUpdated(url, content) {
77 url = url.toLowerCase();
78 const current = this.store[url];
79 const update =
80 typeof content === "string"
81 ? await checksumText(content)
82 : await checksum(content);
83 this.updatedStore[url] = update;
84
85 if (current === update) {
86 return false;
87 } else {
88 return true;
89 }
90 }
91
92 /**
93 *

Callers 1

processFileFunction · 0.80

Calls 2

checksumTextFunction · 0.85
checksumFunction · 0.85

Tested by

no test coverage detected