API Reference

Returns the first key in an object with a particular value (or null if none is found)

function keyWhereValueIs<T extends object>(obj: T, value: any): string | null // Example: const obj = {a: 1, b: 2, c: 3} keyWhereValueIs(obj, 3) //=> "c" keyWhereValueIs(obj,4) //=> null