Loading homepage
Update a nested path without mutation, cloning only changed ancestors and sharing untouched branches.
Input: updateObject({ user: { score: 1 }, active: true }, ["user", "score"], value => value + 1); Output: { user: { score: 2 }, active: true }, with new user/root objects.
Input: updateObject({}, ["items", 2, "name"], () => "Ada"); Output: Creates items as a sparse array with { name: "Ada" } at index 2.
Implement the exported immutable update utility in index.js or index.ts. Tests cover the documented scope and edge cases.