Flattens the given array a single depth level.
Will also flatten array-like values, like a NodeList.
let nested = [1, [2, 3], [4]]
up.util.flatten(nested) // result: [1, 2, 3, 4]
The flattened array
Tip Your coding agent can search these docs locally with the Unpoly agent skill