MCPcopy Create free account
hub / github.com/Dart-Code/Dart-Code / flatMap

Function flatMap

src/shared/utils.ts:15–17  ·  view source on GitHub ↗
(input: readonly T1[], f: (input: T1) => readonly T2[])

Source from the content-addressed store, hash-verified

13}
14
15export function flatMap<T1, T2>(input: readonly T1[], f: (input: T1) => readonly T2[]): T2[] {
16 return input.reduce((acc, x) => acc.concat(f(x)), [] as T2[]);
17}
18
19
20export function filenameSafe(input: string) {

Callers 8

getDocumentSymbolsFunction · 0.90
extractGuidesMethod · 0.90
trackDocMethod · 0.90
provideCodeActionsMethod · 0.90
provideCodeLensesMethod · 0.90
searchPathsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected