Skip to content

unctionjs/mergeAllRight

Repository files navigation

@unction/mergeAllRight

Tests Stability Dependencies

Array<Array | Set | Record<string | number | symbol, B> | Map<B, A> | string> => Array | Set | Record<string | number | symbol, B> | Map<B, A> | string

Merges a list of enumerables (of the same type) into a single enumerable.

mergeAllRight([["0"], ["1"], ["2"]]) // ["0", "1", "2"]
mergeAllRight([{aaa: "aaa"}, {bbb: "bbb"}, {ccc: "ccc"}]) // {aaa: "aaa", bbb: "bbb", ccc: "ccc",}