Form prototype

This commit is contained in:
2026-01-11 09:45:03 +02:00
parent 71403289c2
commit b2817f4233
25 changed files with 2003 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
/**
* Retrieves a nested value from an object using dot notation path
* @param path - Dot-separated path (e.g., "user.address.city")
* @param obj - Object to extract value from
* @returns The value at the specified path, or undefined if not found
*/
export const getNestedValue = (path: string, obj: any): any => {
return path.split('.').reduce((prev, curr) => prev?.[curr], obj)
}