Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "common/util/arrays"

Index

Functions

concatInPlace

  • concatInPlace<T>(target: T[], toAppend: T[]): T[]
  • Appends the toAppend array to the target array. The result is stored in the target array (therefore, in place)

    Type parameters

    • T

    Parameters

    • target: T[]

      the first element to concat and as well as the target of the concatenation operation

    • toAppend: T[]

      the array to append to target

    Returns T[]

flattenArray

  • flattenArray<T>(deepArray: T[]): T[]
  • Flattens the given array.

    Type parameters

    • T

    Parameters

    • deepArray: T[]

      the array to flatten

    Returns T[]

    returns an array containing all the values contained in the sub arrays of deep array.

toArray

  • toArray<T>(iterator: Iterator<T>): T[]
  • Converts the given iterator to an array

    Type parameters

    • T

      element type

    Parameters

    • iterator: Iterator<T>

      the iterator that is to be converted into an array

    Returns T[]

    the array representation of the given iterator

toIterator

  • toIterator<T>(data: T[]): Iterator<T>
  • Creates an iterator that iterates over the given array

    Type parameters

    • T

      element type

    Parameters

    • data: T[]

      the array

    Returns Iterator<T>

    the iterator

Generated using TypeDoc