Options
All
  • Public
  • Public/Protected
  • All
Menu

The Iterable is a set of (key, value) entries which can be iterated, and is the base class for all collections in immutable, allowing them to make use of all the Iterable methods (such as map and filter).

Note: An iterable is always iterated in the same order, however that order may not always be well defined, as is the case for the Map and Set.

Index

Functions

  • Creates a new Iterable.Indexed.

    Type parameters

    • T

    Parameters

    Returns <internal>.Indexed<T>

  • Type parameters

    • T

    Parameters

    Returns <internal>.Indexed<T>

  • Type parameters

    • K

    • V

    Parameters

    Returns <internal>.Indexed<any>

  • Type parameters

    • T

    Parameters

    • array: T[]

    Returns <internal>.Indexed<T>

  • Type parameters

    • T

    Parameters

    • iterator: Iterator<T>

    Returns <internal>.Indexed<T>

  • Type parameters

    • T

    Parameters

    Returns <internal>.Indexed<T>

  • Creates an Iterable.Keyed

    Similar to Iterable(), however it expects iterable-likes of [K, V] tuples if not constructed from a Iterable.Keyed or JS Object.

    Type parameters

    • K

    • V

    Parameters

    Returns <internal>.Keyed<K, V>

  • Type parameters

    • K

    • V

    Parameters

    Returns <internal>.Keyed<K, V>

  • Type parameters

    • K

    • V

    Parameters

    • array: any[]

    Returns <internal>.Keyed<K, V>

  • Type parameters

    • V

    Parameters

    • obj: {}
      • [key: string]: V

    Returns <internal>.Keyed<string, V>

  • Type parameters

    • K

    • V

    Parameters

    • iterator: Iterator<any>

    Returns <internal>.Keyed<K, V>

  • Type parameters

    • K

    • V

    Parameters

    Returns <internal>.Keyed<K, V>

  • Similar to Iterable(), but always returns a Iterable.Set.

    Type parameters

    • T

    Parameters

    Returns <internal>.Set<T>

  • Type parameters

    • T

    Parameters

    Returns <internal>.Set<T>

  • Type parameters

    • K

    • V

    Parameters

    Returns <internal>.Set<any>

  • Type parameters

    • T

    Parameters

    • array: T[]

    Returns <internal>.Set<T>

  • Type parameters

    • T

    Parameters

    • iterator: Iterator<T>

    Returns <internal>.Set<T>

  • Type parameters

    • T

    Parameters

    Returns <internal>.Set<T>

  • isAssociative(maybeAssociative: any): boolean
  • True if maybeAssociative is either a keyed or indexed Iterable.

    Parameters

    • maybeAssociative: any

    Returns boolean

  • isIndexed(maybeIndexed: any): boolean
  • True if maybeIndexed is a Iterable.Indexed, or any of its subclasses.

    Parameters

    • maybeIndexed: any

    Returns boolean

  • isIterable(maybeIterable: any): boolean
  • True if maybeIterable is an Iterable, or any of its subclasses.

    Parameters

    • maybeIterable: any

    Returns boolean

  • isKeyed(maybeKeyed: any): boolean
  • True if maybeKeyed is an Iterable.Keyed, or any of its subclasses.

    Parameters

    • maybeKeyed: any

    Returns boolean

  • isOrdered(maybeOrdered: any): boolean
  • True if maybeOrdered is an Iterable where iteration order is well defined. True for Iterable.Indexed as well as OrderedMap and OrderedSet.

    Parameters

    • maybeOrdered: any

    Returns boolean

Generated using TypeDoc