The type of the elements in the input array.
the array to flatten
the maximum recursive flattening depth.
The flattened array.
If the input is not an array.
const nestedArray = [[1, 2], [3, [4, 5]], [6]];
arrFlatten(nestedArray, 1);
//=> [1, 2, 3, [4, 5], 6]
Generated using TypeDoc
Flattens the passed array recursively to a specified depth. Immutable.