@tb-dev/utils - v6.0.3
    Preparing search index...

    Function upsert

    • Pushes an item to the array if it doesn't exist, otherwise updates it.

      Type Parameters

      • T

      Parameters

      • array: T[]
      • item: T
      • Optionalpredicate: (value: T) => boolean

      Returns void