API Reference

Returns the key with highest numerical value. Returns an array of keys if two or more keys have the same numerical value.

function keyWithLargestValue<T extends object>(obj: T)

// Example:

keyWithLargestValue({ a: 1, b: 2, c: 3 }) //=> "c"

keyWithLargestValue({ a: 1, b: 3, c: 3 }) //=> ["b", "c"]