MCPcopy
hub / github.com/spicetify/cli / checkObject

Function checkObject

jsHelper/spicetifyWrapper.js:119–136  ·  view source on GitHub ↗
(object)

Source from the content-addressed store, hash-verified

117 },
118 test: () => {
119 function checkObject(object) {
120 const { objectToCheck, methods, name } = object;
121 let count = methods.size;
122
123 for (const method of methods) {
124 if (objectToCheck[method] === undefined || objectToCheck[method] === null) {
125 console.error(`${name}.${method} is not available. Please open an issue in the Spicetify repository to inform us about it.`);
126 count--;
127 }
128 }
129 console.log(`${count}/${methods.size} ${name} methods and objects are OK.`);
130
131 for (const key of Object.keys(objectToCheck)) {
132 if (!methods.has(key)) {
133 console.warn(`${name} method ${key} exists but is not in the method list. Consider adding it.`);
134 }
135 }
136 }
137
138 const objectsToCheck = new Set([
139 {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected