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

    Function allExcept

    • Returns a new array excluding items where a given property matches a specific value.

      Type Parameters

      • T
      • K extends string | number | symbol

      Parameters

      • array: T[]

        The original array to filter.

      • property: K

        The property of each item to check.

      • excludeValue: T[K]

        The value to exclude from the result.

      Returns T[]

      A new array containing all items except those matching the exclude value.

      const nonAdmins = allExcept(users, 'role', 'admin');