{"id":20876760,"url":"https://github.com/brooksn/merge-to-source","last_synced_at":"2025-07-07T01:38:45.061Z","repository":{"id":27021514,"uuid":"30486025","full_name":"brooksn/merge-to-source","owner":"brooksn","description":"Merge an object's changes back to its source.","archived":false,"fork":false,"pushed_at":"2015-02-08T09:01:29.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-16T17:59:13.652Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brooksn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-08T08:58:32.000Z","updated_at":"2015-02-08T09:01:29.000Z","dependencies_parsed_at":"2022-08-31T12:13:14.947Z","dependency_job_id":null,"html_url":"https://github.com/brooksn/merge-to-source","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/brooksn/merge-to-source","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooksn%2Fmerge-to-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooksn%2Fmerge-to-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooksn%2Fmerge-to-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooksn%2Fmerge-to-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brooksn","download_url":"https://codeload.github.com/brooksn/merge-to-source/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brooksn%2Fmerge-to-source/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263999348,"owners_count":23542022,"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-11-18T06:54:47.585Z","updated_at":"2025-07-07T01:38:45.040Z","avatar_url":"https://github.com/brooksn.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"merge-to-source\n===============\nMerge an object's changes back to its source.\n\nUsage\n-----\nBasic usage:\n\n```\nvar merge = require('merge-to-source');\nvar pets = { name: 'Spot', age: 3 };\nvar branch = merge(source);\npets.location = 'Earth';\nbranch.age = 4;\nmerge(branch, pets);\n//pets: { name: 'Spot', age: 4, location: 'Earth' }\n```\n\nClone an object and store its initial state:\n\n```\nvar source = { name: 'Spot', age: 3 };\nvar branch = merge(source);\n//make some changes\nmerge(branch, source);\n```\n\nBring your own object and store its initial state:\n\n```\nvar source = { name: 'Spot', age: 3 };\nvar branch = { name: 'Spot', age: 3 };\nmerge(branch, true);\n//make some changes\nmerge(branch, source);\n```\n\nInstall\n-------\n``` npm install merge-to-source --save ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrooksn%2Fmerge-to-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrooksn%2Fmerge-to-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrooksn%2Fmerge-to-source/lists"}