{"_id":"@a11d/key-path","_rev":"7-684f34ae4b9d15f7fcb1a9d1c3fcaf3b","name":"@a11d/key-path","dist-tags":{"latest":"2.1.1"},"versions":{"1.0.0":{"name":"@a11d/key-path","version":"1.0.0","keywords":["key-path","nameof"],"author":{"name":"a11delavar"},"license":"MIT","_id":"@a11d/key-path@1.0.0","maintainers":[{"name":"arshia11d","email":"a11delavar@outlook.com"}],"homepage":"https://github.com/a11delavar/lit#readme","bugs":{"url":"https://github.com/a11delavar/lit/issues"},"dist":{"shasum":"d3e8a4def2fee95f916e77aadd27974941adeb6e","tarball":"https://registry.npmjs.org/@a11d/key-path/-/key-path-1.0.0.tgz","fileCount":9,"integrity":"sha512-GS1LdLZZ4TwPAV/PHJkfBAMCHYmmVOVDoheEix/L//dxJNLlFI1QVNVOa8laRKIVpfd0Z7DBzAqv6vVXvVetEg==","signatures":[{"sig":"MEUCIEGIDTvxloFYRkJt44lcVxSXrqnjhBUv9lmaiCsDSjrEAiEA/lsF5CsJyDoLf2cbowMV0bQrpsques6WVDg43hOAFW4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":42602},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"8bc741069ab23bda2e40f84d781ed41b983e31e2","_npmUser":{"name":"arshia11d","email":"a11delavar@outlook.com"},"repository":{"url":"git+https://github.com/a11delavar/lit.git","type":"git"},"_npmVersion":"9.6.2","description":"A set of type-safe utilities for working with objects and their properties with support for array members.","directories":{},"_nodeVersion":"20.3.1","dependencies":{"@a11d/is-writable":"1.x"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/key-path_1.0.0_1697410773148_0.9535991558744699","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@a11d/key-path","version":"1.1.0","keywords":["key-path","nameof"],"author":{"name":"a11delavar"},"license":"MIT","_id":"@a11d/key-path@1.1.0","maintainers":[{"name":"arshia11d","email":"a11delavar@outlook.com"}],"homepage":"https://github.com/a11delavar/lit#readme","bugs":{"url":"https://github.com/a11delavar/lit/issues"},"dist":{"shasum":"a42e91fcbff72168f30ba2afb5e699e9f21dcce5","tarball":"https://registry.npmjs.org/@a11d/key-path/-/key-path-1.1.0.tgz","fileCount":9,"integrity":"sha512-deHeuFZw8sUtLD04b3tTdXtf1N54pfFuhY6J0ty4haz3gGDphatc2J1dmMfdwtJdPY0o2JyFVKvxxLIIvm9wCA==","signatures":[{"sig":"MEYCIQC1ntQzgaAgdJQ93z+ioOPfQ0Kzw7Y6spMrwG5awJ6h6QIhAKAOFe7oZ90zyuuadwpZu+/Am6yOxjGns5z6PzZNtp+w","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43531},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"461fdc347b0b57ef9692a0908a08a3feaad946e3","_npmUser":{"name":"arshia11d","email":"a11delavar@outlook.com"},"repository":{"url":"git+https://github.com/a11delavar/lit.git","type":"git"},"_npmVersion":"9.6.2","description":"A set of type-safe utilities for working with objects and their properties with support for array members.","directories":{},"_nodeVersion":"20.3.1","dependencies":{"@a11d/is-writable":"1.x"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/key-path_1.1.0_1697411233423_0.163145105207821","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@a11d/key-path","version":"1.1.1","keywords":["key-path","nameof"],"author":{"name":"a11delavar"},"license":"MIT","_id":"@a11d/key-path@1.1.1","maintainers":[{"name":"arshia11d","email":"a11delavar@outlook.com"}],"homepage":"https://github.com/a11delavar/lit#readme","bugs":{"url":"https://github.com/a11delavar/lit/issues"},"dist":{"shasum":"6d3f0cbbb151cd4383ea01e0c0eb5a81a0dab427","tarball":"https://registry.npmjs.org/@a11d/key-path/-/key-path-1.1.1.tgz","fileCount":9,"integrity":"sha512-wecytUATBV/BBfTxH3SLxp9qNS1OdsHfacPp+4R5sPBib+hRjPaLAMO4tDG7LlHZwkzPmS2mXz3bZ//VBb2c2g==","signatures":[{"sig":"MEQCICKym1JGWQa8DBb+lU2PHteto0afagfvZTzhRRpiFkvjAiAk2zjSK2rgGifkwGDgvNR0z+AabG6Epphbwncs0Q5Kfw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":38292},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"70213dfe7f3020d164daca867ff5062b1048162e","_npmUser":{"name":"arshia11d","email":"a11delavar@outlook.com"},"repository":{"url":"git+https://github.com/a11delavar/lit.git","type":"git"},"_npmVersion":"10.9.0","description":"A set of type-safe utilities for working with objects and their properties with support for array members.","directories":{},"_nodeVersion":"22.11.0","dependencies":{"@a11d/is-writable":"1.x"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/key-path_1.1.1_1732143182730_0.9238888007299404","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@a11d/key-path","version":"1.1.2","keywords":["key-path","nameof"],"author":{"name":"a11delavar"},"license":"MIT","_id":"@a11d/key-path@1.1.2","maintainers":[{"name":"arshia11d","email":"a11delavar@outlook.com"}],"homepage":"https://github.com/a11delavar/lit#readme","bugs":{"url":"https://github.com/a11delavar/lit/issues"},"dist":{"shasum":"b446f2eded5fe295640a36d6f59103b7f2b00ab6","tarball":"https://registry.npmjs.org/@a11d/key-path/-/key-path-1.1.2.tgz","fileCount":9,"integrity":"sha512-8kixgWC1NsI/Bk+FqmNcez2lIAb8pgnhXLCE6PIp8lk4jN/T2m6V8oSTCb9gCBbCacs5y84zQecu5mQLW3Efqw==","signatures":[{"sig":"MEYCIQCLxmKVw6V6uOiv15lUZ00ce4voOquRSAc/fegPCcAp+AIhAOWLQcxYAg2Wlw94rQ80h3+5FXWi4+4o2IuM4oHzEybS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36829},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"d911a5119d7471cfc5bd78ecbe1455636fbeb809","_npmUser":{"name":"arshia11d","email":"a11delavar@outlook.com"},"repository":{"url":"git+https://github.com/a11delavar/lit.git","type":"git"},"_npmVersion":"10.9.2","description":"A set of type-safe utilities for working with objects and their properties with support for array members.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"@a11d/is-writable":"1.x"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/key-path_1.1.2_1733942449383_0.7468212319415353","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@a11d/key-path","version":"2.0.0","keywords":["key-path","nameof"],"author":{"name":"a11delavar"},"license":"MIT","_id":"@a11d/key-path@2.0.0","maintainers":[{"name":"arshia11d","email":"a11delavar@outlook.com"}],"homepage":"https://github.com/a11delavar/lit#readme","bugs":{"url":"https://github.com/a11delavar/lit/issues"},"dist":{"shasum":"596e441662a02b5a0cb74e0ee0cc20743365ed24","tarball":"https://registry.npmjs.org/@a11d/key-path/-/key-path-2.0.0.tgz","fileCount":9,"integrity":"sha512-ty9bWv2cdzYFmnga0mDk8MYdQpul4aYYdhUOxgMO988h71MG2v2anMcfCae45eJ5gxaUVkJmBjGJuz9Wv+0gYQ==","signatures":[{"sig":"MEUCIAV5ceZL1tEJZwi5iImg9K+J2YpMd7JAhyXUoVfqhjybAiEA7EqvG/tt+WCJCmdfV0bFTfwy4Z2A4LGEknZmDsLa9aA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38194},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"724e68c23fceab106ea0418eab5e9db28950c100","_npmUser":{"name":"arshia11d","email":"a11delavar@outlook.com"},"repository":{"url":"git+https://github.com/a11delavar/lit.git","type":"git"},"_npmVersion":"11.2.0","description":"A set of type-safe utilities for working with objects and their properties with support for array members.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@a11d/is-writable":"1.x"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/key-path_2.0.0_1744016660151_0.03226091437251499","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@a11d/key-path","version":"2.1.0","keywords":["key-path","nameof"],"author":{"name":"a11delavar"},"license":"MIT","_id":"@a11d/key-path@2.1.0","maintainers":[{"name":"arshia11d","email":"a11delavar@outlook.com"}],"homepage":"https://github.com/a11delavar/lit#readme","bugs":{"url":"https://github.com/a11delavar/lit/issues"},"dist":{"shasum":"58c60d4eed38ceb5e1022524c81ba64a3561f2ad","tarball":"https://registry.npmjs.org/@a11d/key-path/-/key-path-2.1.0.tgz","fileCount":9,"integrity":"sha512-/OXyMgH+5ZIbsOozRh57NS+Fq2zQ3gskCAYSoCV/OC2u5PqXPIrvaUE1Ct+mgoYIw8ov1TDcIupoU29Dq1pbbA==","signatures":[{"sig":"MEUCIAPED320ApGAxvVPB+TZZnJ/Yfh61wCaMDAqAFhdIvxEAiEA46ou3h+MpndFxTouE9o0ARrYlkGf0zW5qvGnqAmtSFk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39187},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","gitHead":"87e881e99e4ad41d4c0cfd3e42af1451ef6f13de","_npmUser":{"name":"arshia11d","email":"a11delavar@outlook.com"},"repository":{"url":"git+https://github.com/a11delavar/lit.git","type":"git"},"_npmVersion":"11.3.0","description":"A set of type-safe utilities for working with objects and their properties with support for array members.","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@a11d/is-writable":"1.x"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/key-path_2.1.0_1746185912892_0.34127719985872385","host":"s3://npm-registry-packages-npm-production"}},"2.1.1":{"name":"@a11d/key-path","version":"2.1.1","description":"A set of type-safe utilities for working with objects and their properties with support for array members.","repository":{"type":"git","url":"git+https://github.com/a11delavar/lit.git"},"keywords":["key-path","nameof"],"author":{"name":"a11delavar"},"license":"MIT","homepage":"https://github.com/a11delavar/lit#readme","type":"module","main":"dist/index.js","types":"dist/index.d.ts","dependencies":{"@a11d/is-writable":"1.x"},"gitHead":"7d3b3f65cc2c38e1585d996c835dce7be723fe39","_id":"@a11d/key-path@2.1.1","bugs":{"url":"https://github.com/a11delavar/lit/issues"},"_nodeVersion":"26.4.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-K9z996XFE1vmoij8+4AC16QYe0pW+gycUEF/fgJ9FGSD+F0JXqrGTvLVMRcPLwdWLQ8WAeS+ICrH1eEzL0Q5DQ==","shasum":"8d5438788a936361aaf6224f7eb69e993d69e5f6","tarball":"https://registry.npmjs.org/@a11d/key-path/-/key-path-2.1.1.tgz","fileCount":10,"unpackedSize":49938,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCcuHs7CEf+WzZVGfPdR86GS5AtQe+1MOFikLTPl3iKdgIgKdC5Fjox7ZoiVjI81rWnDoas2A5UHf7/1hI4SJt4+Fg="}]},"_npmUser":{"name":"arshia11d","email":"a@delavar.net"},"directories":{},"maintainers":[{"name":"arshia11d","email":"a@delavar.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/key-path_2.1.1_1787143688694_0.8263583670723931"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-15T22:59:33.039Z","modified":"2026-08-19T12:48:09.178Z","1.0.0":"2023-10-15T22:59:33.364Z","1.1.0":"2023-10-15T23:07:13.691Z","1.1.1":"2024-11-20T22:53:02.953Z","1.1.2":"2024-12-11T18:40:49.593Z","2.0.0":"2025-04-07T09:04:20.330Z","2.1.0":"2025-05-02T11:38:33.101Z","2.1.1":"2026-08-19T12:48:08.837Z"},"bugs":{"url":"https://github.com/a11delavar/lit/issues"},"author":{"name":"a11delavar"},"license":"MIT","homepage":"https://github.com/a11delavar/lit#readme","keywords":["key-path","nameof"],"repository":{"type":"git","url":"git+https://github.com/a11delavar/lit.git"},"description":"A set of type-safe utilities for working with objects and their properties with support for array members.","maintainers":[{"name":"arshia11d","email":"a@delavar.net"}],"readme":"# KeyPath\n\nA set of type-safe utilities for working with objects and their properties with support for array members.\n\n- `KeyPath.of` - A type-safe way to create a key-path.\n- `KeyPath.get` - A function to get the value by a given key-path.\n- `KeyPath.set` - A function to set the value by a given key-path.\n- `KeyPath.isWritable` - Check if a key-path is writable.\n\n```ts\nconst customer = {\n\tname: 'John Doe',\n\taddresses: [\n\t\t{ street: '123 Main St', city: 'Anytown' },\n\t\t{ street: '456 Elm St', city: 'Anytown' },\n\t] as const,\n}\n\nconst keyPath = KeyPath.of<typeof customer>('addresses.0.street') // 'addresses.0.street'\nconst value = KeyPath.get(customer, 'addresses.0.street') // '123 Main St'\nKeyPath.set(customer, 'addresses.0.street', '180 Azadi St')\n/*\n{\n\tname: 'John Doe',\n\taddresses: [\n\t\t{ street: '180 Azadi St', city: 'Anytown' },\n\t\t{ street: '456 Elm St', city: 'Anytown' },\n\t] as const,\n}\n*/\n```","readmeFilename":"README.md"}