MCPcopy Create free account
hub / github.com/Snapchat/Valdi / flatten

Function flatten

valdi/vscode_debugger/src/common/objUtils.ts:283–290  ·  view source on GitHub ↗
(items: ReadonlyArray<ReadonlyArray<T>>)

Source from the content-addressed store, hash-verified

281 * Flattens an array of arrays into a single-dimensional array.
282 */
283export function flatten<T>(items: ReadonlyArray<ReadonlyArray<T>>): T[] {
284 let out: T[] = [];
285 for (const list of items) {
286 out = out.concat(list);
287 }
288
289 return out;
290}
291
292/**
293 * Picks the subset of keys from the object.

Callers 4

provideMethod · 0.90
provideMethod · 0.90
_getObjectPropertiesMethod · 0.90
allUserBreakpointsMethod · 0.90

Calls 1

concatMethod · 0.45

Tested by

no test coverage detected