@pathmaker-digital/pmd-utilities - v2.2.6
    Preparing search index...

    Function bulkUpdateInArray

    • Update multiple items in an array by matching a property against a list of values. Returns a new array with the matched items updated.

      Type Parameters

      • T
      • K extends string | number | symbol

      Parameters

      • array: T[]

        The original array.

      • key: K

        The property key to match.

      • values: T[K][]

        The list of values to update.

      • updater: (item: T) => T

        A export function that returns the updated item.

      Returns T[]

      A new array with the updated items.