{"id":13624457,"url":"https://github.com/robinvdvleuten/shvl","last_synced_at":"2025-04-06T12:09:17.516Z","repository":{"id":26620562,"uuid":"109239165","full_name":"robinvdvleuten/shvl","owner":"robinvdvleuten","description":"🚧  Get and set dot-notated properties within an object.","archived":false,"fork":false,"pushed_at":"2022-08-29T14:35:52.000Z","size":416,"stargazers_count":73,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-24T08:31:08.411Z","etag":null,"topics":["dot-notation","getter","javascript","object","setter"],"latest_commit_sha":null,"homepage":"https://npm.im/shvl","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/robinvdvleuten.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}},"created_at":"2017-11-02T08:44:12.000Z","updated_at":"2023-10-04T15:29:54.000Z","dependencies_parsed_at":"2022-07-27T08:32:27.624Z","dependency_job_id":null,"html_url":"https://github.com/robinvdvleuten/shvl","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinvdvleuten%2Fshvl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinvdvleuten%2Fshvl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinvdvleuten%2Fshvl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robinvdvleuten%2Fshvl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robinvdvleuten","download_url":"https://codeload.github.com/robinvdvleuten/shvl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247478323,"owners_count":20945266,"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":["dot-notation","getter","javascript","object","setter"],"created_at":"2024-08-01T21:01:42.787Z","updated_at":"2025-04-06T12:09:17.496Z","avatar_url":"https://github.com/robinvdvleuten.png","language":"JavaScript","funding_links":[],"categories":["javascript"],"sub_categories":[],"readme":"# shvl\n\nGet and set dot-notated properties within an object.\n\n\u003cimg src=\"https://media.giphy.com/media/3o85xLDQLoZD1rk07u/giphy-downsized.gif\" width=\"350\" /\u003e\n\n\u003chr /\u003e\n\n[![Build Status](https://img.shields.io/github/workflow/status/robinvdvleuten/shvl/test.svg)](https://github.com/robinvdvleuten/shvl/actions?query=workflow%3Atest)\n[![NPM version](https://img.shields.io/npm/v/shvl.svg)](https://www.npmjs.com/package/shvl)\n[![NPM downloads](https://img.shields.io/npm/dm/shvl.svg)](https://www.npmjs.com/package/shvl)\n[![MIT license](https://img.shields.io/github/license/robinvdvleuten/shvl.svg)](https://github.com/robinvdvleuten/shvl/blob/master/LICENSE)\n\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com)\n\n\u003ca href=\"https://webstronauts.com/\"\u003e\n\t\u003cimg src=\"https://webstronauts.com/badges/sponsored-by-webstronauts.svg\" alt=\"Sponsored by The Webstronauts\" width=\"200\" height=\"65\"\u003e\n\u003c/a\u003e\n\n## Installation\n\n```\nnpm install --save shvl\n```\n\nThe [UMD](https://github.com/umdjs/umd) build is also available on [unpkg](https://unpkg.com/shvl/dist/shvl.umd.js):\n\n```\n\u003cscript src=\"//unpkg.com/shvl/dist/shvl.umd.js\"\u003e\u003c/script\u003e\n```\n\nThis exposes the shlv object as a global.\n\n## Usage\n\n```js\nimport * as shvl from 'shvl';\n\nlet obj = {\n\ta: {\n\t\tb: {\n\t\t\tc: 1\n\t\t\td: undefined\n\t\t\te: null\n\t\t}\n\t}\n};\n\n// Use dot notation for keys\nshvl.set(obj, 'a.b.c', 2);\nshvl.get(obj, 'a.b.c') === 2;\n\n// Or use an array as key\nshvl.get(obj, ['a', 'b', 'c']) === 1;\n\n// Returns undefined if the path does not exist and no default is specified\nshvl.get(obj, 'a.b.c.f') === undefined;\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\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://robinvdvleuten.nl/\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/238295?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRobin van der Vleuten\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"#question-robinvdvleuten\" title=\"Answering Questions\"\u003e💬\u003c/a\u003e \u003ca href=\"https://github.com/robinvdvleuten/shvl/commits?author=robinvdvleuten\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/robinvdvleuten/shvl/commits?author=robinvdvleuten\" title=\"Documentation\"\u003e📖\u003c/a\u003e \u003ca href=\"#example-robinvdvleuten\" title=\"Examples\"\u003e💡\u003c/a\u003e \u003ca href=\"#ideas-robinvdvleuten\" title=\"Ideas, Planning, \u0026 Feedback\"\u003e🤔\u003c/a\u003e \u003ca href=\"#infra-robinvdvleuten\" title=\"Infrastructure (Hosting, Build-Tools, etc)\"\u003e🚇\u003c/a\u003e \u003ca href=\"https://github.com/robinvdvleuten/shvl/pulls?q=is%3Apr+reviewed-by%3Arobinvdvleuten\" title=\"Reviewed Pull Requests\"\u003e👀\u003c/a\u003e \u003ca href=\"https://github.com/robinvdvleuten/shvl/commits?author=robinvdvleuten\" title=\"Tests\"\u003e⚠️\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://github.com/ajenkinski\"\u003e\u003cimg src=\"https://avatars0.githubusercontent.com/u/20757262?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eajenkinski\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/robinvdvleuten/shvl/commits?author=ajenkinski\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://lemonslab.me\"\u003e\u003cimg src=\"https://avatars.githubusercontent.com/u/6394077?v=4?s=100\" width=\"100px;\" alt=\"\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMatheus Vrech\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/robinvdvleuten/shvl/commits?author=vrechson\" title=\"Code\"\u003e💻\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-restore --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinvdvleuten%2Fshvl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobinvdvleuten%2Fshvl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobinvdvleuten%2Fshvl/lists"}