source: node_modules/es-toolkit/dist/compat/object/findKey.d.mts

Last change on this file was a762898, checked in by istevanoska <ilinastevanoska@…>, 5 months ago

Added visualizations

  • Property mode set to 100644
File size: 728 bytes
Line 
1import { ObjectIteratee } from '../_internal/ObjectIteratee.mjs';
2
3/**
4 * Finds the key of the first element that matches the given predicate.
5 *
6 * This function determines the type of the predicate and delegates the search
7 * to the appropriate helper function. It supports predicates as functions, objects,
8 * arrays, or strings.
9 *
10 * @template T - The type of the object.
11 * @param {T | null | undefined} obj - The object to inspect.
12 * @param {ObjectIteratee<T>} predicate - The predicate to match.
13 * @returns {string | undefined} Returns the key of the matched element, else `undefined`.
14 */
15declare function findKey<T>(obj: T | null | undefined, predicate?: ObjectIteratee<T>): string | undefined;
16
17export { findKey };
Note: See TracBrowser for help on using the repository browser.