Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

remove

  • remove<T>(array: T[], predicate: PredicateCallback<T>): T[]
  • remove<T>(array: T[], index: number, length?: number): T[]
  • remove<T>(array: T[], indexs: number[]): T[]
  • remove the elements that meet the condition specified in a callback function

    Type parameters

    • T

    Parameters

    Returns T[]

  • remove the elements from given start location

    Type parameters

    • T

    Parameters

    • array: T[]
    • index: number
    • Optional length: number

    Returns T[]

  • remove the elements of given index array

    Type parameters

    • T

    Parameters

    • array: T[]
    • indexs: number[]

    Returns T[]

swap

  • swap<T>(array: T[], idx1: number, idx2: number): T[]
  • swap<T, P>(array: T[], pred1: P, pred2: P): T[]
  • swap two element in array by given index

    Type parameters

    • T

    Parameters

    • array: T[]
    • idx1: number
    • idx2: number

    Returns T[]

  • swap two element that meet the condition specified in a callback function in array

    Type parameters

    Parameters

    • array: T[]
    • pred1: P
    • pred2: P

    Returns T[]

Generated using TypeDoc