basant307/AI_Governance_Project
048
1/**2 * Returns the value behind the symbol with the given name.3 */4export function getValueBySymbol<T>(5 symbolName: string,6 source: object7): T | undefined {8 const ownSymbols = Object.getOwnPropertySymbols(source)9 10 const symbol = ownSymbols.find((symbol) => {11 return symbol.description === symbolName12 })13 14 if (symbol) {15 return Reflect.get(source, symbol)16 }17 18 return19}20 