Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IFilterOrderBy

Hierarchy

  • IFilterOrderBy

Callable

  • __call<T>(array: T[], expression: string | function | string | function, reverse?: boolean): T[]
  • Orders a specified array by the expression predicate. It is ordered alphabetically for strings and numerically for numbers. Note: if you notice numbers are not being sorted as expected, make sure they are actually being saved as numbers and not strings.

    Type parameters

    • T

    Parameters

    • array: T[]

      The array to sort.

    • expression: string | function | string | function

      A predicate to be used by the comparator to determine the order of elements.

    • Optional reverse: boolean

      Reverse the order of the array.

    Returns T[]

    Reverse the order of the array.

Generated using TypeDoc