• Compares two arrays and returns an object holding an array for the added and another one for the removed items.

    Type Parameters

    • T

    Parameters

    • current: undefined | null | T[]

      The array of values after the changes were performed

    • initial: undefined | null | T[]

      The array of values before the changes were performed

    Returns {
        added: T[];
        removed: T[];
    }

    • added: T[]

      The items that were added

    • removed: T[]

      The items that were removed

  • Compares two arrays and returns an object holding an array for the added and another one for the removed items.

    Type Parameters

    • T

    Parameters

    • current: undefined | null | T[]

      The array of values after the changes were performed

    • initial: undefined | null | T[]

      The array of values before the changes were performed

    • Optional key: keyof T

      The name of the property that will be used to identify objects to compare them for updates

    Returns {
        added: T[];
        removed: T[];
        updated: T[];
    }

    • added: T[]

      The items that were added

    • removed: T[]

      The items that were removed

    • updated: T[]

      The items that were updated

Generated using TypeDoc