This method is like _.flatMap except that it recursively flattens the mapped results.
_.flatMap
4.7.0
function duplicate(n) { return [[[n, n]]];}_.flatMapDeep([1, 2], duplicate);// => [1, 1, 2, 2] Copy
function duplicate(n) { return [[[n, n]]];}_.flatMapDeep([1, 2], duplicate);// => [1, 1, 2, 2]
The collection to iterate over.
Returns the new flattened array.
_.flatMapDeep
Generated using TypeDoc
This method is like
_.flatMap
except that it recursively flattens the mapped results.Since
4.7.0
Example