Wrapper around IterableIterator interface offering a set of helpers to deal with iterations in a simple way

Remarks

Since 0.0.7

Type Parameters

  • T

Implements

  • IterableIterator<T>

Constructors

Properties

g: IterableIterator<T>

Underlying data of the Stream

Methods

  • Drop elements from the Stream while f(element) === true

    WARNING: It closes the current stream

    Parameters

    • f: ((v) => boolean)

      Drop condition

        • (v): boolean
        • Parameters

          Returns boolean

    Returns Stream<T>

    Remarks

    Since 0.0.1

  • Check whether all elements of the Stream are successful for f

    WARNING: It closes the current stream

    Parameters

    • f: ((v) => boolean)

      Condition to check

        • (v): boolean
        • Parameters

          Returns boolean

    Returns boolean

    Remarks

    Since 0.0.1

  • Flat map all elements of the Stream using f

    WARNING: It closes the current stream

    Type Parameters

    • U

    Parameters

    • f: ((v) => IterableIterator<U>)

      Mapper function

        • (v): IterableIterator<U>
        • Parameters

          Returns IterableIterator<U>

    Returns Stream<U>

    Remarks

    Since 0.0.1

  • Take the nth element of the Stream of the last (if it does not exist)

    WARNING: It closes the current stream

    Parameters

    • nth: number

      Position of the element to extract

    Returns null | T

    Remarks

    Since 0.0.12

  • Check whether one of the elements of the Stream is successful for f

    WARNING: It closes the current stream

    Parameters

    • f: ((v) => boolean)

      Condition to check

        • (v): boolean
        • Parameters

          Returns boolean

    Returns [boolean, null | T]

    Remarks

    Since 0.0.1

  • Join others Stream to the current Stream

    WARNING: It closes the current stream and the other ones (as soon as it iterates over them)

    Parameters

    • Rest ...others: IterableIterator<T>[]

      Streams to join to the current Stream

    Returns Stream<T>

    Remarks

    Since 0.0.1