Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • deepFlatten(): any[]
  • Flatten nested arrays by concatenating their contents

    Returns any[]

    An array containing the concatenated inner values

  • equals(other: any[]): boolean
  • Test element-wise equality of the values of this array against the values of another array

    Parameters

    • other: any[]

      Some other array against which to test equality

    Returns boolean

    Are the two arrays element-wise equal?

  • partition(rule: Function): any[]
  • Partition an original array into two children array based on a logical test Elements which test as false go into the first result while elements testing as true appear in the second

    Parameters

    • rule: Function

    Returns any[]

    An Array of length two whose elements are the partitioned pieces of the original

  • filterJoin(sep: string): string
  • Join an Array using a string separator, first filtering out any parts which return a false-y value

    Parameters

    • sep: string

      The separator string

    Returns string

    The joined string, filtered of any false values

  • findSplice(find: Function, replace: any): any
  • Find an element within the Array and remove it from the array

    Parameters

    • find: Function

      A function to use as input to findIndex

    • replace: any

    Returns any

    The replacement element, the removed element, or null if no element was found.

  • fromRange(n: number, min?: number): number[]
  • Create and initialize an array of length n with integers from 0 to n-1

    memberof

    Array

    Parameters

    • n: number

      The desired array length

    • min: number = 0

    Returns number[]

    An array of integers from min to min+n