Class Iterator

A lazy collection iterator yields a single value at time upon request


  • Iterator


  • Parameters

    • source: Source

      An iterable object or function. Array - return one element per cycle Object{next:Function} - call next() for the next value (this also handles generator functions) Function - call to return the next value

    Returns Iterator


getNext: Callback<IteratorResult, boolean>
isDone: boolean = false
iteratees: Iteratee[] = []
yieldedValues: RawArray = []


  • Drop a number of values from the sequence


    • n: number

      Number of items to drop greater than 0

    Returns Iterator

  • Execute the funcion for each value. Will stop when an execution returns false.

    Type Parameters

    • T = unknown


    Returns boolean

    false iff f return false for AnyVal execution, otherwise true

  • Returns the reduction of sequence according the reducing function

    Type Parameters

    • T = unknown


    • f: Callback<T, unknown>

      a reducing function

    • Optional initialValue: unknown

    Returns T

  • Returns the number of matched items in the sequence

    Returns number

  • Returns a new lazy object with results of the transformation The entire sequence is realized.


    • fn: Callback<Source, unknown>

      Tranform function of type (Array) => (Any)

    Returns Iterator

  • Returns the fully realized values of the iterators. The return value will be an array unless lazy.first() was used. The realized values are cached for subsequent calls

    Type Parameters

    • T

    Returns T[]

Generated using TypeDoc