flatten

Array
since 0.1.0

Arguments

  • Array The array to flatten.

Returns

Array the new flattened array.

Flattens array a single level deep.

Example of Lodash _.flatten

_.flatten([1, [2, [3, [4]], 5]]);
// => [1, 2, [3, [4]], 5]