Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "merge-with"

Index

Functions

Const meldObjWith

  • meldObjWith<T>(f: Fn2<T, T, T>, dest: IObjectOf<T>, ...xs: Nullable<IObjectOf<T>>[]): IObjectOf<T>
  • Mutable version of mergeObjWith. Returns modified dest object.

    remarks

    Since v4.4.0, the __proto__ property will be ignored to avoid prototype pollution.

    Type parameters

    • T

    Parameters

    • f: Fn2<T, T, T>

      -

    • dest: IObjectOf<T>

      -

    • Rest ...xs: Nullable<IObjectOf<T>>[]

      -

    Returns IObjectOf<T>

Const mergeMapWith

  • mergeMapWith<K, V>(f: Fn2<V, V, V>, dest: Map<K, V>, ...xs: Nullable<Map<K, V>>[]): Map<K, V>

Const mergeObjWith

  • mergeObjWith<T>(f: Fn2<T, T, T>, dest: IObjectOf<T>, ...xs: Nullable<IObjectOf<T>>[]): IObjectOf<T>
  • Immutably merges given objects in a pairwise manner. Applies function f if the same key exists in both objects and uses that function's return value as new value for that key.

    remarks

    Since v4.4.0, the __proto__ property will be ignored to avoid prototype pollution.

    Type parameters

    • T

    Parameters

    • f: Fn2<T, T, T>
    • dest: IObjectOf<T>
    • Rest ...xs: Nullable<IObjectOf<T>>[]

    Returns IObjectOf<T>

Generated using TypeDoc