Hierarchy

  • Array
    • default

Constructors

  • Parameters

    • Optional arrayLength: number

    Returns default

Methods

  • Returns Promise<any[]>

  • Alias of .toSet().toArray()

    Parameters

    • Optional mapper: ((value: any) => any)
        • (value: any): any
        • Parameters

          • value: any

          Returns any

    Returns any[]

  • Alias of .toMap(value => [mapper(value), value]).values().toArray()

    Parameters

    • Optional mapper: ((value: any) => any)
        • (value: any): any
        • Parameters

          • value: any

          Returns any

    Returns any[]

  • Parameters

    • predicate: ((value: any) => any)
        • (value: any): any
        • Parameters

          • value: any

          Returns any

    Returns undefined | number

  • Gets the index that the given item would occupy in this array, assuming this array is sorted by the given list of sort functions.

    Parameters

    • value: any

      The item to get the index of.

    • Rest ...sorters: List<any>

      See sort for more information

    Returns number

  • Type Parameters

    • GROUP

    Parameters

    • grouper: ((value: any, index: number, obj: any[]) => GROUP)
        • (value: any, index: number, obj: any[]): GROUP
        • Parameters

          • value: any
          • index: number
          • obj: any[]

          Returns GROUP

    Returns [GROUP, any[]][]

  • Parameters

    • value: any

    Returns undefined | number

  • Inserts a single item in this array, at the sorted position as is calculated by the given list of sort functions.

    Returns

    The new array length

    Parameters

    • value: any

      The item to insert.

    • Rest ...sorters: List<any>

      See sort for more information

    Returns number

  • Parameters

    • sortInitializer: ((sorter: ISorter<any>) => any)
        • (sorter: ISorter<any>): any
        • Parameters

          • sorter: ISorter<any>

          Returns any

    Returns any[]

  • Toggles the given value in this array.

    Parameters

    • value: any

      The value to toggle in the array.

    • Optional includes: boolean

      Whether the value should be present in the array.

      • true — include in the array
      • false — remove from the array
      • undefined — toggle whether it's in the array. (If it currently is, remove it. If it's not, add it.)

    Returns void

Generated using TypeDoc