Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "merge-apply"

Index

Functions

Const mergeApplyMap

  • mergeApplyMap<K, V>(src: Map<K, V>, xs: Map<K, V | function>): any
  • Similar to mergeApplyObj(), but for ES6 Maps instead of plain objects.

    Type parameters

    • K

    • V

    Parameters

    • src: Map<K, V>
    • xs: Map<K, V | function>

    Returns any

Const mergeApplyObj

  • mergeApplyObj<V>(src: IObjectOf<V>, xs: IObjectOf<V | function>): any
  • Similar to mergeObj(), but only supports 2 args and any function values in xs will be called with respective value in src to produce a new / derived value for that key. Returns new merged object and does not modify any of the inputs.

    mapKeysObj({a: "hello", b: 23}, {a: (x) => x + " world", b: 42});
    // { a: 'hello world', b: 42 }

    Type parameters

    • V

    Parameters

    • src: IObjectOf<V>
    • xs: IObjectOf<V | function>

    Returns any

Generated using TypeDoc