Flattens the given array a single depth level.
array
Will also flatten array-like values, like a NodeList.
NodeList
let nested = [1, [2, 3], [4]] up.util.flatten(nested) // result: [1, 2, 3, 4]
An array which might contain other arrays
The flattened array