kaven-basic - v4.5.0
    Preparing search index...

    Function FindKeyValuePair

    • Finds and returns the first key-value pair in the provided dictionary (dic) whose key matches the specified key.

      Type Parameters

      • T

        The type of values stored in the dictionary.

      Parameters

      • dic: TStringObject<T>

        The dictionary object to search through.

      • key: string

        The key to search for within the dictionary.

      • ignoreCase: boolean = false

        (Optional) If true, performs a case-insensitive key comparison.

      Returns undefined | { key: string; value: T }

      • Returns undefined if no match is found, otherwise, returns the matching key-value pair.