MCPcopy Create free account
hub / github.com/andywer/postguard / flatMap

Function flatMap

src/resolver.ts:9–11  ·  view source on GitHub ↗
(elements: In[], mapper: (element: In) => Out[])

Source from the content-addressed store, hash-verified

7} from "./types"
8
9function flatMap<In, Out>(elements: In[], mapper: (element: In) => Out[]): Out[] {
10 return elements.reduce((flattened, element) => [...flattened, ...mapper(element)], [] as Out[])
11}
12
13function getTableByName(tables: TableSchema[], tableName: string): TableSchema {
14 const table = tables.find(schema => schema.tableName === tableName)

Callers 2

resolveColumnReferencesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected