The collection to iterate over.
Optional
iteratee: Iteratee<number, T, T[]>The function invoked per iteration.
Optional
Returns the new flattened array.
5.4.0
[[flatMap]],[[flatMapDepth]],[[flatten]],[[flattenDeep]],[[flattenDepth]],[[map]],[[mapKeys]],[[mapValues]]
function duplicate(n) {
return [[[n, n]]]
}
flatMapDeep([1, 2], duplicate)
// => [1, 1, 2, 2]
Optional
iteratee: Iteratee<string, T, Record<string, T>>Optional
This method is like
flatMap
except that it recursively flattens the mapped results.