API

Class SmartArray<T>

Defines an GC Friendly array where the backfield array do not shrink to prevent over allocations.

Type Parameters

  • T

Hierarchy (View Summary)

Implements

Index
data: T[]

The full set of data from the array.

length: number = 0

The active length of the array.

  • Returns whether an element is part of the active data.

    Parameters

    • value: T

      defines the value to look for

    Returns boolean

    true if found in the active data otherwise false

  • Iterates over the active data and apply the lambda to them.

    Parameters

    • func: (content: T) => void

      defines the action to apply on each value.

    Returns void

  • Returns the position of a value in the active data.

    Parameters

    • value: T

      defines the value to find the index for

    Returns number

    the index if found in the active data otherwise -1