Create a new object with key-value pairs inverted, in the case of duplicate values the latter value will overwrite the previous value.
object
(object): input string
(object): returns an object with key-value pairs inverted
const result = Objects.invert({ a: 1, b: 2, c: 1 });
console.log(result);
> { '1': 'c', '2': 'b' }