{"id":15763147,"url":"https://github.com/shigma/deconstruct-merge","last_synced_at":"2025-06-15T19:10:23.053Z","repository":{"id":103500679,"uuid":"174700042","full_name":"shigma/deconstruct-merge","owner":"shigma","description":"A simple library for merging complex options.","archived":false,"fork":false,"pushed_at":"2019-03-14T14:16:00.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T11:30:29.104Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/shigma.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}},"created_at":"2019-03-09T13:48:38.000Z","updated_at":"2021-04-09T14:57:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d958ca7-4525-4684-986c-c95436ce4eba","html_url":"https://github.com/shigma/deconstruct-merge","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shigma/deconstruct-merge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fdeconstruct-merge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fdeconstruct-merge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fdeconstruct-merge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fdeconstruct-merge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shigma","download_url":"https://codeload.github.com/shigma/deconstruct-merge/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shigma%2Fdeconstruct-merge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260036155,"owners_count":22949256,"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":[],"created_at":"2024-10-04T11:40:43.565Z","updated_at":"2025-06-15T19:10:23.023Z","avatar_url":"https://github.com/shigma.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deconstruct-merge\n\n[![npm](https://img.shields.io/npm/v/deconstruct-merge.svg)](https://www.npmjs.com/package/deconstruct-merge)\n\nA _simple_ library for merging _complex_ options. First deconstruct, then merge.\n\n## Example\n\n```js\nconst Mergeable = require('deconstruct-merge')\n\nconst config = new Mergeable({\n  foo: 'flat',\n  bar: 'array',\n  baz: [\n    'assign',\n    'override',\n  ],\n})\n\nconfig\n  .merge({\n    foo: 1,\n    baz: [\n      { a: 1 },\n      { b: 2 },\n    ],\n  })\n  .merge({\n    foo: [2],\n    bar: [2],\n  })\n  .merge(undefined)\n  .merge({\n    bar: 3,\n    baz: [\n      { a: 2, b: 3 },\n      { c: 4 },\n    ]\n  })\n  .value()\n\n// output:\n// { foo: [ 1, 2 ],\n//   bar: [ [ 2 ], 3 ],\n//   baz: [ { a: 2, b: 3 }, { c: 4 } ] }\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshigma%2Fdeconstruct-merge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshigma%2Fdeconstruct-merge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshigma%2Fdeconstruct-merge/lists"}