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