API Reference

Returns an object with the keys and values reversed.

function invert<T extends object>(obj: T): { [key: string]: string }

// Example:

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

NOTE: Values must be able to be converted to strings.