{"id":30060012,"url":"https://github.com/tiaanduplessis/set-nested-prop","last_synced_at":"2025-08-08T01:41:31.960Z","repository":{"id":57357006,"uuid":"92684593","full_name":"tiaanduplessis/set-nested-prop","owner":"tiaanduplessis","description":"Set nested object property (supports custom seperator and mutation)","archived":false,"fork":false,"pushed_at":"2019-06-02T22:38:17.000Z","size":72,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-29T19:44:56.379Z","etag":null,"topics":["dot-notation","nested","object","property","set","setter"],"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/tiaanduplessis.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}},"created_at":"2017-05-28T20:13:32.000Z","updated_at":"2022-05-30T09:52:04.000Z","dependencies_parsed_at":"2022-09-08T12:30:53.015Z","dependency_job_id":null,"html_url":"https://github.com/tiaanduplessis/set-nested-prop","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tiaanduplessis/set-nested-prop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fset-nested-prop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fset-nested-prop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fset-nested-prop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fset-nested-prop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiaanduplessis","download_url":"https://codeload.github.com/tiaanduplessis/set-nested-prop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaanduplessis%2Fset-nested-prop/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269352394,"owners_count":24402671,"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-08-07T02:00:09.698Z","response_time":73,"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":["dot-notation","nested","object","property","set","setter"],"created_at":"2025-08-08T01:41:20.208Z","updated_at":"2025-08-08T01:41:31.926Z","avatar_url":"https://github.com/tiaanduplessis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# set-nested-prop\n[![package version](https://img.shields.io/npm/v/set-nested-prop.svg?style=flat-square)](https://npmjs.org/package/set-nested-prop)\n[![package downloads](https://img.shields.io/npm/dm/set-nested-prop.svg?style=flat-square)](https://npmjs.org/package/set-nested-prop)\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![package license](https://img.shields.io/npm/l/set-nested-prop.svg?style=flat-square)](https://npmjs.org/package/set-nested-prop)\n[![make a pull request](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n\n\u003e Set nested object property (supports custom seperator, mutation, forcing creation \u0026 multi set)\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Contribute](#contribute)\n- [License](#License)\n\n## Install\n\nThis project uses [node](https://nodejs.org) and [npm](https://www.npmjs.com). \n\n```sh\n$ npm install set-nested-prop\n$ # OR\n$ yarn add set-nested-prop\n```\n\n## Usage\n\n```js\nimport set from 'set-nested-prop'\n\n// By default the original object is not modified and . is used as a seperator\n\nconst obj1 = {\n  foo: {\n    bar: {\n      baz: 5\n    }\n  }\n}\n\nconst newObj = set(obj1, 'foo.bar.baz', 6)\nconsole.log(newObj) // { foo: { bar: { baz: 6 } } }\nconsole.log(obj1) // { foo: { bar: { baz: 5 } } }\n\n// You can opt in for mutating\nconst obj2 = {\n  foo: 5\n}\n\nset(obj2, 'foo', 6, { mut: true })\nconsole.log(obj2.foo) // 6\n\n// A custom seperator can be used\n\nconst customObj = set(obj1, 'foo*bar*baz', 7, { sep: '*' })\nconsole.log(customObj) // { foo: { bar: { baz: 7 } } }\n\nconst forceObj = {}\nconst forceObjResult = set(forceObj, 'foo.bar', 1, {force: true})\nconsole.log(forceObjResult) // {foo: {bar: 1}}\n\n```\n\n## Contribute\n\n1. Fork it and create your feature branch: git checkout -b my-new-feature\n2. Commit your changes: git commit -am 'Add some feature'\n3. Push to the branch: git push origin my-new-feature \n4. Submit a pull request\n\n## License\n\nMIT\n    ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaanduplessis%2Fset-nested-prop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiaanduplessis%2Fset-nested-prop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaanduplessis%2Fset-nested-prop/lists"}