{"id":22281488,"url":"https://github.com/kripod/record-like-deep-assign","last_synced_at":"2025-07-28T20:30:53.719Z","repository":{"id":57349318,"uuid":"286295851","full_name":"kripod/record-like-deep-assign","owner":"kripod","description":"Recursively assigns enumerable own properties of the given sources to a target object","archived":false,"fork":false,"pushed_at":"2020-08-09T19:28:27.000Z","size":216,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-26T02:48:25.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/kripod.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-08-09T18:38:23.000Z","updated_at":"2021-09-05T09:51:38.000Z","dependencies_parsed_at":"2022-08-29T18:40:55.765Z","dependency_job_id":null,"html_url":"https://github.com/kripod/record-like-deep-assign","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kripod/record-like-deep-assign","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kripod%2Frecord-like-deep-assign","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kripod%2Frecord-like-deep-assign/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kripod%2Frecord-like-deep-assign/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kripod%2Frecord-like-deep-assign/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kripod","download_url":"https://codeload.github.com/kripod/record-like-deep-assign/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kripod%2Frecord-like-deep-assign/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267580457,"owners_count":24110844,"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","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-03T16:18:39.267Z","updated_at":"2025-07-28T20:30:53.436Z","avatar_url":"https://github.com/kripod.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Record-like deep assign\n\nRecursively assigns enumerable own properties of the given sources to a target object.\n\n- API inspired by [`Object.assign`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign), with source objects applied from left to right:\n\n  ```js\n  import deepAssign from \"record-like-deep-assign\"\n\n  deepAssign(target, ...sources) // Returns `target`\n  ```\n\n- Plain objects are merged deeply:\n\n  ```js\n  // Result: { x: { a: 1, b: 2 } }\n  deepAssign({ x: { a: 1 } }, { x: { b: 2 } })\n  ```\n\n- Arrays and constructor-instantiated objects are treated like primitives. They aren't merged but replaced in their entirely:\n\n  ```js\n  // Result: { arr: [\"c\"] }\n  deepAssign({ arr: [\"a\", \"b\"] }, { arr: [\"c\"] })\n\n  // Result: { x: Date 1997-11-21 }\n  deepAssign({ x: new Date(\"1996-12-03\") }, { x: new Date(\"1997-11-21\") })\n  ```\n\n- Nullish sources are ignored:\n\n  ```js\n  // Result: { a: 1, b: 2 }\n  deepAssign({ a: 1 }, null, undefined, { b: 2 })\n  ```\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/kripod\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/14854048?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eKristóf Poduszló\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#maintenance-kripod\" title=\"Maintenance\"\u003e🚧\u003c/a\u003e \u003ca href=\"https://github.com/kripod/record-like-deep-assign/commits?author=kripod\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/kripod/record-like-deep-assign/commits?author=kripod\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"https://github.com/kripod/record-like-deep-assign/commits?author=kripod\" title=\"Tests\"\u003e⚠️\u003c/a\u003e \u003ca href=\"#ideas-kripod\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#infra-kripod\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://gitter.im/millsp\"\u003e\u003cimg src=\"https://avatars1.githubusercontent.com/u/18401805?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003ePierre-Antoine Mills\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#ideas-millsp\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkripod%2Frecord-like-deep-assign","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkripod%2Frecord-like-deep-assign","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkripod%2Frecord-like-deep-assign/lists"}