UNPKG

redux-token-auth

Version:

Redux actions and reducers to integrate with Devise Token Auth

11 lines (9 loc) 314 B
import { SingleLayerStringMap } from '../types' export const invertMapKeysAndValues = (stringMap: SingleLayerStringMap): SingleLayerStringMap => { const newStringMap: SingleLayerStringMap = {} for (let key in stringMap) { const val = stringMap[key] newStringMap[val] = key } return newStringMap }