Function eachKey

  • Iterator for each key of an array or object.

    Example

    for (const i of eachKey(['a', 'b']) {
    console.log(i); //0, 1
    }

    Type Parameters

    • T

    Parameters

    • object: ArrayLike<T>

    Returns IterableIterator<number>

  • Type Parameters

    • T extends {
          [key: string]: any;
      }

    • K extends string | number | symbol

    Parameters

    • object: T

    Returns IterableIterator<string>

Generated using TypeDoc