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

Method compactMap

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

Source from the content-addressed store, hash-verified

868 return this.map(s, o).reduce((s, o) => s.concat(o), [])
869 }
870 compactMap(s, o) {
871 const i = []
872 return (
873 this.forEach((a) => {
874 const u = s.bind(o)(a)
875 u && i.push(u)
876 }),
877 i
878 )
879 }
880 filter(s, o) {
881 return new _(this.content.filter(s, o))
882 }

Callers

nothing calls this directly

Calls 3

forEachMethod · 0.95
bindMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected