Basic usage

Given an object returns a new object with the keys and values reversed.

import { invert } from 'radash'

const powersByGod = {
  ra: 'sun',
  loki: 'tricks',
  zeus: 'lighning'
}

invert(gods) // => { sun: ra, tricks: loki, lightning: zeus }

Testing

This _.invert function is 100% covered by tests. See them and contribute at GitHub.

Source

See the source for _.invert on GitHub.