flatMapDeep (Functional Programming) es-toolkit
Creates a function that maps each value and deeply flattens the result. Use it with pipe.
Info
Prefer the original es-toolkit flatMapDeep in ordinary code. Use this fp variant when composing transformations with pipe.
Usage
flatMapDeep calls iteratee for each value in the piped array and recursively flattens the returned arrays.
Parameters
iteratee(item: T, index: number) => Urequired
The function that maps each value before deep flattening.
Returns
A function that maps a readonly T[] to a deeply flattened array.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.