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

Function flatten

frontend/public/swagger-ui-bundle.js:39086–39088  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

39084 function lib_normalizeArray(s) {
39085 return Array.isArray(s) ? s : [s]
39086 }
39087 function flatten(s) {
39088 return [].concat(...s.map((s) => (Array.isArray(s) ? flatten(s) : s)))
39089 }
39090 function cleanArray(s) {
39091 return s.filter((s) => void 0 !== s)

Callers 3

forEachNewPatchFunction · 0.85
forEachFunction · 0.85

Calls 3

concatMethod · 0.80
mapMethod · 0.45
isArrayMethod · 0.45

Tested by

no test coverage detected