export const invertMap = (map) => new Map(Array.from(map.entries()).map(([key, value]) => [value, key]))
Swaps keys and values with a more descriptive name.
Target style API. Preferred for new code.
Helpers
Source: helpers/switchKeyValue.mjs
Target Style
Legacy Style