Implement deepOmit(object, paths) for dot-path object removal.
This is a common frontend utility interview problem because it tests recursive cloning, safe nested traversal, and the difference between changing a returned value and mutating the original input.
1. Remove requested paths
- Return a new object with the requested dot paths removed.
- Preserve unrelated branches and values.
- Ignore missing paths safely.
2. Keep the input immutable
- Do not mutate the original object.
- Clone nested objects and arrays so changes to the returned object do not leak back into the source.
3. Path format
- Paths are strings like
user.name, settings.theme, or profile.address.city. - You do not need to support bracket notation for this problem.