{"id":27404447,"url":"https://github.com/john-james-gh/tiny-deep-merge","last_synced_at":"2025-04-14T05:29:29.662Z","repository":{"id":287704392,"uuid":"965534588","full_name":"john-james-gh/tiny-deep-merge","owner":"john-james-gh","description":"A tiny utility to deeply merge multiple plain objects. Arrays are overwritten. Zero dependencies.","archived":false,"fork":false,"pushed_at":"2025-04-13T13:09:59.000Z","size":37,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T13:19:37.541Z","etag":null,"topics":["cjs","deep-merge","esm","lite","merge","minimal","object","tiny","typescript","utility"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/tiny-deep-merge","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/john-james-gh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-13T11:33:06.000Z","updated_at":"2025-04-13T13:04:25.000Z","dependencies_parsed_at":"2025-04-13T13:19:41.792Z","dependency_job_id":"ce94d05e-41ec-49da-a8e0-7b0e255fa3b9","html_url":"https://github.com/john-james-gh/tiny-deep-merge","commit_stats":null,"previous_names":["john-james-gh/tiny-deep-merge"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-james-gh%2Ftiny-deep-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-james-gh%2Ftiny-deep-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-james-gh%2Ftiny-deep-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/john-james-gh%2Ftiny-deep-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/john-james-gh","download_url":"https://codeload.github.com/john-james-gh/tiny-deep-merge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248826354,"owners_count":21167671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cjs","deep-merge","esm","lite","merge","minimal","object","tiny","typescript","utility"],"created_at":"2025-04-14T05:29:25.430Z","updated_at":"2025-04-14T05:29:29.655Z","avatar_url":"https://github.com/john-james-gh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tiny-deep-merge\n\n\u003e A utility to deeply merge multiple plain objects.  \n\u003e Arrays are overwritten (not concatenated).  \n\u003e No options, no magic — deterministic merges.\n\n---\n\n## 🚀 Why use this?\n\n- Deep merge of nested plain objects\n- Merges any number of inputs\n- Arrays and primitives are **overwritten** by default\n- Zero dependencies (404 B minified and gzipped, compared to 723 B for `deepmerge`)\n- Fully type-safe (TypeScript inference preserved)\n- Does **not** mutate source objects\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install tiny-deep-merge\n# or\npnpm add tiny-deep-merge\n# or\nyarn add tiny-deep-merge\n```\n\n## 🧪 Usage\n\n```javascript\n// ES Module\nimport { merge } from \"tiny-deep-merge\"\n\n// CommonJS\nconst { merge } = require(\"tiny-deep-merge\")\n\nconst a = { user: { name: \"Jess\", age: 25 } }\nconst b = { user: { age: 31, active: true } }\n\nconst result = merge(a, b)\n// =\u003e { user: { name: \"Jess\", age: 31, active: true } }\n```\n\n## ✅ Multi-object merge\n\n```javascript\nmerge({ a: 1 }, { b: 2 }, { c: { nested: true } })\n// =\u003e { a: 1, b: 2, c: { nested: true } }\n```\n\n## 🧹 Arrays are overwritten by default\n\n```javascript\nmerge({ tags: [\"a\", \"b\"] }, { tags: [\"c\"] })\n// =\u003e { tags: [\"c\"] }\n```\n\n## 🔒 Does not mutate source objects\n\n```javascript\nconst a = { count: 1 }\nconst b = { count: 2 }\n\nconst result = merge(a, b)\n\nconsole.log(a) // { count: 1 }\nconsole.log(result) // { count: 2 }\n```\n\n## 🧠 Type Safety\n\n```javascript\nconst merged = merge({ id: 1 }, { name: \"Alice\" }, { profile: { age: 25 } })\n\n// merged: { id: number, name: string, profile: { age: number } }\n```\n\n## 🤨 What this does not do\n\n- No array concatenation — arrays are overwritten.\n- No merging of class instances, Maps, Sets, or Dates.\n- No custom merge strategies.\n- No runtime bloat.\n\n---\n\n## 📄 License\n\nMIT @ John James\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohn-james-gh%2Ftiny-deep-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohn-james-gh%2Ftiny-deep-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohn-james-gh%2Ftiny-deep-merge/lists"}