Function mergePropertyArrays

  • Merges all arrays by their property in the given objects.

    Type Parameters

    • T extends Record<PropertyKey, unknown[]>

    Parameters

    • ...inputs: readonly Readonly<T>[]

    Returns T

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

    mergePropertyArrays(
    {
    a: ['a', 'b'],
    },
    {
    a: ['c', 'd'],
    },
    ); // output is `{a: ['a', 'b', 'c', 'd']}`