Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StrideIterator<T>

An iterator which traverses a source iterator step-wise.

Type parameters

  • T

Hierarchy

  • StrideIterator

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Construct a new stride iterator.

    Parameters

    • source: IIterator<T>

      The iterator of values of interest.

    • step: number

      The distance to step on each iteration. A value of less than 1 will behave the same as a value of 1.

    Returns StrideIterator

Properties

Private _source

_source: IIterator<T>

Private _step

_step: number

Methods

clone

iter

next

  • next(): T | undefined
  • Get the next value from the iterator.

    Returns T | undefined

    The next value from the iterator, or undefined.

Generated using TypeDoc