( value: IN, path: string, )
| 52 | * @param path - Path to the property |
| 53 | */ |
| 54 | export function getDeepProperty<OUT = BoundValue, IN = BoundValue>( |
| 55 | value: IN, |
| 56 | path: string, |
| 57 | ): OUT | undefined { |
| 58 | let result: BoundValue = value; |
| 59 | const props = path.split('.').filter(Boolean); |
| 60 | for (const p of props) { |
| 61 | if (result == null) { |
| 62 | return undefined; |
| 63 | } |
| 64 | result = result[p]; |
| 65 | } |
| 66 | return <OUT>result; |
| 67 | } |
| 68 | |
| 69 | /** |
| 70 | * Resolve entries of an object into a new object with the same keys. If one or |
no outgoing calls
no test coverage detected