core3-utils

@wixc3/common on Github

Home > @wixc3/common > flatMap

flatMap() function

Signature:

export declare function flatMap<S, T>(iterable: Nullable<Iterable<S>>, mapFn: Mapping<S, T | Iterable<T>>): Iterable<Flat<T>>;

Parameters

Parameter Type Description
iterable [Nullable](/core3-utils/common.nullable.html)<Iterable<S>>
mapFn [Mapping](/core3-utils/common.mapping.html)<S, T \| Iterable<T>>

Returns:

Iterable<Flat<T>>

a mapped, flattened iterables