UNPKG

o

Version:

common object helper functions

22 lines (21 loc) 464 B
import { KeyOfOptions, OObject } from './types'; /** * Get the key to the specified value in dot notation * * @example * ``` * const a = { a: 1, b: { c: 2 } }; * * keyOf(a, 2); // => undefined * keyOf(a, 2, { * follow: true, * }); // => 'b.c' * ``` * * @throws TypeError * * @since 1.0.0 * @version 2.0.0 */ declare function keyOf(obj: OObject, value: any, options?: KeyOfOptions): string | undefined; export default keyOf;