• import { mergeObjects } from '@src/hylo-components/utils/usefull/usefull';

    Creates a new object by merging two other objects. Keys of the second object overwrite keys of the first. Values in the second object which are empty arrays or result in false while not of type boolean are ignored. This is a deep merge.

    The "ignore" object defines keys which will not be merged. If a key in the "ignore" object is set to true, the value of the first object is taken if set, otherwise the value of the second object. If the key in the "ignore" object is not set to true, the value of either objects is not copied over to the merged object. Nested objects in the "ignore" object are possible to address deeper keys.

    Parameters

    • obj_1: object

      the first original object

    • obj_2: object

      the second original object

    • ignore: object = {}

      keys in this object are ignored while merging (optional)

    Returns object

    merged object

Generated using TypeDoc