@alanscodelog/utils
    Preparing search index...

    Function merge

    • Basic object merger (does not handle Maps, Sets, class instances, etc). Merges like lodash merge* except arrays are not merged position by position, they're just combined. For arrays that just override the existing key use override

      The first object is mutated so clone it first if you don't want it mutated. Passing {} as the first param will also work but only for shallow objects.

      	merge(base, other) // mutates base
      const merged = merge({}, base, other) // mutates nothing

      * Arrays are not deep merged. They are not cloned if there is no overriding key, and their items are never looked through.

      Type Parameters

      • TBase extends any[] | Record<string, any> = any[] | Record<string, any>
      • TOthers extends (any[] | readonly any[] | Record<string, any>)[] = (any[] | readonly any[] | Record<string, any>)[]
      • TOther extends any[] | readonly any[] | Record<string, any> = TOthers[number]

      Parameters

      Returns TBase & TOther