{"id":19041950,"url":"https://github.com/writetome51/modify-object","last_synced_at":"2025-02-21T22:44:19.391Z","repository":{"id":122062438,"uuid":"187980681","full_name":"writetome51/modify-object","owner":"writetome51","description":"Function merges one object into another","archived":false,"fork":false,"pushed_at":"2021-02-28T01:43:26.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T16:45:53.902Z","etag":null,"topics":["javascript","manipulation","modify","object","objects","typescript"],"latest_commit_sha":null,"homepage":null,"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/writetome51.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-05-22T06:55:53.000Z","updated_at":"2021-02-28T01:43:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"5df2c39d-0d54-4a46-8de6-c118adc08891","html_url":"https://github.com/writetome51/modify-object","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fmodify-object","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fmodify-object/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fmodify-object/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/writetome51%2Fmodify-object/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/writetome51","download_url":"https://codeload.github.com/writetome51/modify-object/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100512,"owners_count":19747683,"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":["javascript","manipulation","modify","object","objects","typescript"],"created_at":"2024-11-08T22:33:29.660Z","updated_at":"2025-02-21T22:44:19.368Z","avatar_url":"https://github.com/writetome51.png","language":"JavaScript","readme":"# modifyObject(\u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;objectToModify,\u003cbr\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;changes: object\u003cbr\u003e): void\n\n`changes` are merged into `objectToModify`.  \n`changes` is not modified. `objectToModify` keeps its own prototype chain.\n\n\n## Examples\n```js\nlet objToModify = {prop1: 10, prop2: 20};\nlet changes = {prop1: 100, prop3: 30};\n\nmodifyObject(objToModify, changes);\nconsole.log(objToModify);\n// { prop1: 100, prop2: 20, prop3: 30 }\n\nchanges = {\n    getSum: function () {\n        return this.prop1 + this.prop2 + this.prop3;\n    }\n};\nmodifyObject(objToModify, changes);\nconsole.log(objToModify.getSum());\n// 150\n```\n\n## Installation\n\n```bash\nnpm i @writetome51/modify-object\n```\n\n## Loading\n```js\nimport {modifyObject} from '@writetome51/modify-object';\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fmodify-object","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwritetome51%2Fmodify-object","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwritetome51%2Fmodify-object/lists"}