MCPcopy Create free account
hub / github.com/d3/d3-array / flatten

Function flatten

src/merge.js:1–5  ·  view source on GitHub ↗
(arrays)

Source from the content-addressed store, hash-verified

1function* flatten(arrays) {
2 for (const array of arrays) {
3 yield* array;
4 }
5}
6
7export default function merge(arrays) {
8 return Array.from(flatten(arrays));

Callers 1

mergeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected