Function mergeDefinedProperties

  • Merge all objects together but ignore any override values that are undefined or null or missing. This only merges objects at the top level, it is not a deep merge.

    Type Parameters

    Parameters

    Returns T

    import {mergeDefinedProperties} from '@augment-vir/common';

    mergeDefinedProperties({a: 'default', b: 'default'}, {a: 'override', b: undefined});
    // output is `{a: 'override', b: 'default'}`