Loading homepage
Transform leaves of nested objects and arrays while preserving container structure and leaving the input untouched.
Input: deepMap({ score: 2, items: [3, null] }, value => typeof value === "number" ? value * 2 : value); Output: { score: 4, items: [6, null] }
Input: deepMap({ user: { name: "Ada" } }, (value, path) => path.join(".") + ":" + value); Output: { user: { name: "user.name:Ada" } }
Implement the exported recursive utility in index.js or index.ts. Tests cover the documented scope and edge cases.