{"id":18475907,"url":"https://github.com/mariuslundgard/segmented-property","last_synced_at":"2025-06-11T11:38:27.684Z","repository":{"id":65493753,"uuid":"89287802","full_name":"mariuslundgard/segmented-property","owner":"mariuslundgard","description":"A utility for immutably setting and getting properties on JavaScript objects as slash-delimited paths.","archived":false,"fork":false,"pushed_at":"2023-10-27T22:10:37.000Z","size":582,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T15:19:22.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/mariuslundgard.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-04-24T21:15:11.000Z","updated_at":"2023-10-27T21:39:40.000Z","dependencies_parsed_at":"2024-06-21T17:51:19.381Z","dependency_job_id":"166297e5-5b93-49a2-8d4e-525a45240611","html_url":"https://github.com/mariuslundgard/segmented-property","commit_stats":{"total_commits":51,"total_committers":2,"mean_commits":25.5,"dds":"0.039215686274509776","last_synced_commit":"fe38753f99d209b3cb7d0dca990e429d22c777d9"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariuslundgard%2Fsegmented-property","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariuslundgard%2Fsegmented-property/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariuslundgard%2Fsegmented-property/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariuslundgard%2Fsegmented-property/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariuslundgard","download_url":"https://codeload.github.com/mariuslundgard/segmented-property/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariuslundgard%2Fsegmented-property/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259256430,"owners_count":22829628,"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-06T10:35:40.034Z","updated_at":"2025-06-11T11:38:27.662Z","avatar_url":"https://github.com/mariuslundgard.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# segmented-property\n\nA utility for immutably setting and getting properties on JavaScript objects as slash-delimited paths.\n\n```sh\nnpm install segmented-property\n```\n\n[![npm version](https://img.shields.io/npm/v/segmented-property.svg?style=flat-square)](https://www.npmjs.com/package/segmented-property)\n\n## Usage\n\n```js\nimport {get, set} from 'segmented-property'\n\nconst obj1 = {foo: {bar: 1}}\nconst obj2 = set(obj1, 'foo/bar', 2)\n\nconsole.log(get(obj1, 'foo/bar')) // 1\nconsole.log(get(obj2, 'foo/bar')) // 2\n```\n\n## API\n\n#### `get(source, [key])`\n\nGets a value.\n\n#### `set(source, [key], value)`\n\nSets a new value and returns a new object.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariuslundgard%2Fsegmented-property","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariuslundgard%2Fsegmented-property","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariuslundgard%2Fsegmented-property/lists"}