Sequencer. Defines an ascending or descending sequence of big integers implemented as an iterable iterator.

Implements

  • Iterable<bigint>
  • IterableIterator<bigint>

Constructors

  • Constructor.

    Parameters

    • startValue: number | bigint

      Start value.

    • count: number

      Count of values. If count is zero or positive, iteration ascends from start value, otherwise it descends from start value.

    Returns Sequencer

Accessors

  • get startValue(): bigint
  • Get the start value (inclusive).

    Returns bigint

  • get endValue(): bigint
  • Get the end value (exclusive).

    Returns bigint

  • get count(): number
  • Get the count of values.

    Returns number

  • get minValue(): bigint
  • Get the minimum value (inclusive).

    Returns bigint

  • get maxValue(): bigint
  • Get the maximum value (inclusive).

    Returns bigint

Methods

  • Iterator implementation.

    Returns IteratorResult<bigint, number>

    Iterator result. If iterator is exhausted, the value is absolute value of the count.

  • Iterable implementation.

    Returns this

    this