import { SingleLayerStringMap } from '../types' ; export const invertMapKeysAndValues = ( stringMap ) : SingleLayerStringMap => { const newStringMap = { } ; for ( let key in stringMap ) { const val = stringMap [ key ] ; newStringMap [ val ] = key ; } return newStringMap ; } ;