Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

flatten-deep

v4.17.11arrow_drop_down
v4.17.11
STATUS
Passing
DOWNLOADS
37
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
10 months ago
SIZE
1 KB
Recursively flattens `array`.
1 contributor
Use flatten-deep in your project ?
Copied
npm i @bit/lodash.lodash.flatten-deep
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
  1,
  [2, [3, [4]], 5],
]); // => [1, 2, 3, 4, 5]
modifieddraft
chevron_left
chevron_right
flattenDeep (
array:Array
) : Array

Recursively flattens array.

Example
_.flattenDeep([1, [2, [3, [4]], 5]]);
// => [1, 2, 3, 4, 5]
Argument
array: Array

The array to flatten.

Returns
Array

Returns the new flattened array.