basant307/AI_Governance_Project
048
1function keyBy(set, getKeyFromValue) {2 const result = new Map();3 for (const value of set) {4 const newKey = getKeyFromValue(value, value, set);5 result.set(newKey, value);6 }7 return result;8}9 10export { keyBy };11 