Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TakeIterator<T>

An iterator which takes a fixed number of items from a source.

Type parameters

  • T

Hierarchy

  • TakeIterator

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Construct a new take iterator.

    Parameters

    • source: IIterator<T>

      The iterator of interest.

    • count: number

      The number of items to take from the source.

    Returns TakeIterator

Properties

Private _count

_count: number

Private _source

_source: IIterator<T>

Methods

clone

iter

  • Get an iterator over the object's values.

    Returns IIterator<T>

    An iterator which yields the object's values.

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