@luolapeikko/ts-common
    Preparing search index...

    Class IterCore

    The core iteration functions.

    v1.0.0

    Index

    Methods

    • Asserts that the given value is an async iterable.

      Type Parameters

      • T

        The type of elements contained in the async iterable.

      Parameters

      • value: unknown

        The value to check.

      Returns AsyncIterable<T>

      The value as an async iterable.

      If the value is not an async iterable.

      v1.0.0

    • Type Parameters

      • T

      Parameters

      • value: unknown

      Returns Iterable<T>

    • Builds an type error Invalid AsyncIterable: ${JSON.stringify(value)}.

      Parameters

      • value: unknown

        The invalid value.

      Returns TypeError

      The created error.

      v1.0.0

    • Builds an type error Invalid Iterable: ${JSON.stringify(value)}.

      Parameters

      • value: unknown

        The invalid value.

      Returns TypeError

      The created error.

      v1.0.0

    • Type guard that checks if a value is an async iterable object.

      Type Parameters

      • T

        The type of elements contained in the async iterable.

      Parameters

      • value: unknown

        The value to check for async iterability.

      Returns value is AsyncIterable<T, any, any>

      true if the value implements the AsyncIterable interface; otherwise, false.

      v1.0.0

    • Type guard that checks if a value is an iterable object.

      Type Parameters

      • T

        The type of elements contained in the iterable.

      Parameters

      • value: unknown

        The value to check for iterability.

      Returns value is Iterable<T, any, any>

      true if the value implements the Iterable interface; otherwise, false.

      v1.0.0

    • Type guard that checks if a value is not an async iterable object.

      Type Parameters

      • T

        The type of elements contained in the async iterable.

      Parameters

      • value: unknown

        The value to check for non-async iterability.

      Returns value is unknown

      true if the value does not implement the AsyncIterable interface; otherwise, false.

      v1.0.0

    • Type guard that checks if a value is not an iterable object.

      Type Parameters

      • T

        The type of elements contained in the iterable.

      Parameters

      • value: unknown

        The value to check for non-iterability.

      Returns value is unknown

      true if the value does not implement the Iterable interface; otherwise, false.

      v1.0.0