Options
All
  • Public
  • Public/Protected
  • All
Menu

Module src/object/findFirstKey

Index

Functions

Functions

Const findFirstKey

  • findFirstKey<T>(obj: T, predicate: (item: any) => boolean): string
  • Returns the name of the key for the first result resolved by the predicate

    Type parameters

    • T: Record<string, any>

    Parameters

    • obj: T
    • predicate: (item: any) => boolean
        • (item: any): boolean
        • Parameters

          • item: any

          Returns boolean

    Returns string

    {string}

Generated using TypeDoc