Skip to content

unctionjs/mergeLeft

Repository files navigation

@unction/mergeLeft

Tests Stability Dependencies

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

Merges two enumerables, preferring left.

const left = {
  alpha: "1",
  beta: "1"
}
const right = {
  beta: "2",
  zeta: "3"
}

mergeLeft(left)(right)

Which returns:

{
  alpha: "1",
  beta: "1",
  zeta: "3"
}