MCPcopy Index your code
hub / github.com/dataease/SQLBot / forEach

Function forEach

frontend/public/swagger-ui-bundle.js:39068–39082  ·  view source on GitHub ↗
(s, o, i)

Source from the content-addressed store, hash-verified

39066 : o(s, i[i.length - 1], i)
39067 )
39068 }
39069 function forEach(s, o, i) {
39070 let a = []
39071 if ((i = i || []).length > 0) {
39072 const u = o(s, i[i.length - 1], i)
39073 u && (a = a.concat(u))
39074 }
39075 if (Array.isArray(s)) {
39076 const u = s.map((s, a) => forEach(s, o, i.concat(a)))
39077 u && (a = a.concat(u))
39078 } else if (lib_isObject(s)) {
39079 const u = Object.keys(s).map((a) => forEach(s[a], o, i.concat(a)))
39080 u && (a = a.concat(u))
39081 }
39082 return ((a = flatten(a)), a)
39083 }
39084 function lib_normalizeArray(s) {
39085 return Array.isArray(s) ? s : [s]

Callers

nothing calls this directly

Calls 7

lib_isObjectFunction · 0.85
flattenFunction · 0.85
concatMethod · 0.80
oFunction · 0.70
isArrayMethod · 0.45
mapMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected