@mudssky/jsutils
    Preparing search index...

    Function toggle

    • If the item matching the condition already exists in the list it will be removed. If it does not it will be added.

      Type Parameters

      • T

      Parameters

      • list: readonly T[]
      • item: T
      • OptionaltoKey: null | ((item: T, idx: number) => string | number | symbol)

        Converts an item of type T item into a value that can be checked for equality

      • Optionaloptions: { strategy?: "prepend" | "append" }

      Returns T[]