(obj: any, path: (string | number)[])
| 1996 | |
| 1997 | // Helper function to get a value at a nested path |
| 1998 | const getValueAtPath = (obj: any, path: (string | number)[]): any => { |
| 1999 | let current = obj |
| 2000 | for (const key of path) { |
| 2001 | if (current && typeof current === 'object' && key in current) { |
| 2002 | current = current[key] |
| 2003 | } else { |
| 2004 | return undefined |
| 2005 | } |
| 2006 | } |
| 2007 | return current |
| 2008 | } |
| 2009 | |
| 2010 | // Helper function to convert value to expected type |
| 2011 | const convertValue = (value: any, expected: string, received: string): any => { |
no outgoing calls
no test coverage detected