Sha256: 878dd7d7deef0ef29d08768dd75d3292d2449b14361201d864bc2551b6b694e5
Contents?: true
Size: 391 Bytes
Versions: 26
Compression:
Stored size: 391 Bytes
Contents
/** * Returns the value behind the symbol with the given name. */ export function getValueBySymbol<T>( symbolName: string, source: object ): T | undefined { const ownSymbols = Object.getOwnPropertySymbols(source) const symbol = ownSymbols.find((symbol) => { return symbol.description === symbolName }) if (symbol) { return Reflect.get(source, symbol) } return }
Version data entries
26 entries across 26 versions & 1 rubygems