Options
All
  • Public
  • Public/Protected
  • All
Menu

Utility class with functions to operate on AsyncIterator instances

Hierarchy

  • Iterators

Index

Methods

Static find

  • find<T>(iterator: AsyncIterator<T>, predicate: function): Promise<T>
  • Iterates over elements of an AsyncIterator, returning the first element ´predicate´ returns truthy for.

    Type parameters

    • T

    Parameters

    • iterator: AsyncIterator<T>
    • predicate: function
        • (element: T): boolean
        • Parameters

          • element: T

          Returns boolean

    Returns Promise<T>

Static getFirst

Static toArray

  • Returns an array representation of an AsyncIterator. Assumes the iterator will end sometime

    Type parameters

    • T

    Parameters

    Returns Promise<T[]>

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc