MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / isArrayPresent

Function isArrayPresent

server/sources/shared/protocols/api.protocol.js:49–74  ·  view source on GitHub ↗
(responseData)

Source from the content-addressed store, hash-verified

47}
48
49function isArrayPresent(responseData) {
50 let arrayFound = false;
51 Object.keys(responseData).forEach((k1) => {
52 if (determineType(responseData[k1]) === "array") {
53 arrayFound = true;
54 }
55
56 if (!arrayFound && determineType(responseData[k1]) === "object") {
57 Object.keys(responseData[k1]).forEach((k2) => {
58 if (determineType(responseData[k1][k2]) === "array") {
59 arrayFound = true;
60 }
61
62 if (!arrayFound && determineType(responseData[k1][k2]) === "object") {
63 Object.keys(responseData[k1][k2]).forEach((k3) => {
64 if (determineType(responseData[k1][k2][k3]) === "array") {
65 arrayFound = true;
66 }
67 });
68 }
69 });
70 }
71 });
72
73 return arrayFound;
74}
75
76async function getSavedConnection(connectionOrId) {
77 const connectionId = typeof connectionOrId === "object" ? connectionOrId?.id : connectionOrId;

Callers 1

runDataRequestFunction · 0.85

Calls 1

determineTypeFunction · 0.50

Tested by

no test coverage detected