{"_id":"@humanspeak/svelte-keyed","_rev":"6-28b125ac4c507cb358700588b2b146f5","name":"@humanspeak/svelte-keyed","dist-tags":{"latest":"5.0.1"},"versions":{"3.0.0":{"name":"@humanspeak/svelte-keyed","version":"3.0.0","keywords":["svelte","sveltejs","derived","store","rxjs"],"author":{"name":"Humanspeak, Inc."},"license":"MIT","_id":"@humanspeak/svelte-keyed@3.0.0","maintainers":[{"name":"humanspeakadmin","email":"admin@humanspeak.com"}],"homepage":"https://github.com/humanspeak/svelte-keyed#readme","bugs":{"url":"https://github.com/humanspeak/svelte-keyed/issues"},"dist":{"shasum":"a0d85bc3e5d2f669b16c3ccc46fa9b01464dbdee","tarball":"https://registry.npmjs.org/@humanspeak/svelte-keyed/-/svelte-keyed-3.0.0.tgz","fileCount":5,"integrity":"sha512-tO55MiGQMhpnNjHi8pfs9ISdQeSmFfJr/fTAwlU68tMMKQW7RvbaowPWtH59C1N1w5CRmuBuIecHcUFQXTfn5Q==","signatures":[{"sig":"MEUCIQDNZ7VPXJWSZJCZpiKesSJsk0z+5+6ssUAGHCXbks7q6gIgRxCq82mhAJax7Xn10oesydk9lkwqsgcGbU8M/24ffl4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11846},"type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"a46cf5b568f176f72150332acba68b0da1915d70","scripts":{"dev":"vite dev","lint":"prettier --check . && eslint .","test":"vitest run --coverage","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","package":"svelte-kit sync && svelte-package && publint","preview":"vite preview","lint:fix":"npm run format && eslint . --fix","test:only":"vitest run","test:watch":"vitest","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"humanspeakadmin","email":"admin@humanspeak.com"},"repository":{"url":"git+ssh://git@github.com/humanspeak/svelte-keyed.git","type":"git"},"_npmVersion":"10.9.0","description":"![svelte-keyed-banner](https://user-images.githubusercontent.com/42545742/145455110-0d90603a-5fb3-453a-a9ea-7c4e3b443913.png)","directories":{},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.10","tslib":"^2.8.1","eslint":"^9.14.0","svelte":"^5.1.13","vitest":"^2.1.4","globals":"^15.12.0","publint":"^0.2.12","prettier":"^3.3.3","type-fest":"^4.26.1","@eslint/js":"^9.14.0","typescript":"^5.6.3","svelte-check":"^4.0.6","@sveltejs/kit":"^2.8.0","@types/eslint":"9.6.1","@eslint/eslintrc":"^3.1.0","@sveltejs/package":"^2.3.7","@vitest/coverage-v8":"^2.1.4","eslint-plugin-svelte":"^2.46.0","@sveltejs/adapter-auto":"^3.3.1","eslint-config-prettier":"^9.1.0","prettier-plugin-svelte":"^3.2.7","@typescript-eslint/parser":"^8.13.0","@sveltejs/vite-plugin-svelte":"^4.0.0","@typescript-eslint/eslint-plugin":"^8.13.0"},"peerDependencies":{"svelte":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/svelte-keyed_3.0.0_1731267938378_0.4302257499823827","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@humanspeak/svelte-keyed","version":"3.0.1","keywords":["svelte","sveltejs","derived","store","rxjs"],"author":{"name":"Humanspeak, Inc."},"license":"MIT","_id":"@humanspeak/svelte-keyed@3.0.1","maintainers":[{"name":"humanspeakadmin","email":"admin@humanspeak.com"}],"homepage":"https://github.com/humanspeak/svelte-keyed#readme","bugs":{"url":"https://github.com/humanspeak/svelte-keyed/issues"},"dist":{"shasum":"7df20f0900469a0696b71e378f0954b052725969","tarball":"https://registry.npmjs.org/@humanspeak/svelte-keyed/-/svelte-keyed-3.0.1.tgz","fileCount":5,"integrity":"sha512-idE5OoVM65k70Vk4s+G3pvXTFEsyWTSoDhvjCG0JLXZuKxMsu0sZkZXKO79U5ajMAMihCyAAuTgnzHJA/GgjKg==","signatures":[{"sig":"MEQCIB4360wlS5gAbwww0OUDku+P1vHLqv1Eg9ikAnt/c5GYAiBXNM+3X7ttkntTlf/1oQN016mHsBwCIpmYfw/Av3iE8w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16113},"type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"65951ed26d77c85f370212b2226c54cf5023666b","scripts":{"dev":"vite dev","lint":"prettier --check . && eslint .","test":"vitest run --coverage","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","package":"svelte-kit sync && svelte-package && publint","preview":"vite preview","lint:fix":"npm run format && eslint . --fix","test:only":"vitest run","test:watch":"vitest","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"humanspeakadmin","email":"admin@humanspeak.com"},"repository":{"url":"git+ssh://git@github.com/humanspeak/svelte-keyed.git","type":"git"},"_npmVersion":"10.9.0","description":"![svelte-keyed-banner](https://user-images.githubusercontent.com/42545742/145455110-0d90603a-5fb3-453a-a9ea-7c4e3b443913.png)","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.3","tslib":"^2.8.1","eslint":"^9.16.0","svelte":"^5.8.0","vitest":"^2.1.8","globals":"^15.13.0","publint":"^0.2.12","prettier":"^3.4.2","type-fest":"^4.30.0","@eslint/js":"^9.16.0","typescript":"^5.7.2","svelte-check":"^4.1.1","@sveltejs/kit":"^2.9.0","@types/eslint":"9.6.1","@eslint/eslintrc":"^3.2.0","@sveltejs/package":"^2.3.7","@vitest/coverage-v8":"^2.1.8","eslint-plugin-svelte":"^2.46.1","@sveltejs/adapter-auto":"^3.3.1","eslint-config-prettier":"^9.1.0","prettier-plugin-svelte":"^3.3.2","@typescript-eslint/parser":"^8.17.0","@sveltejs/vite-plugin-svelte":"^5.0.1","@typescript-eslint/eslint-plugin":"^8.17.0"},"peerDependencies":{"svelte":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/svelte-keyed_3.0.1_1733499222034_0.733535632230548","host":"s3://npm-registry-packages"}},"3.1.0":{"name":"@humanspeak/svelte-keyed","version":"3.1.0","keywords":["svelte","sveltejs","derived","store","rxjs"],"author":{"name":"Humanspeak, Inc."},"license":"MIT","_id":"@humanspeak/svelte-keyed@3.1.0","maintainers":[{"name":"humanspeakadmin","email":"admin@humanspeak.com"}],"homepage":"https://github.com/humanspeak/svelte-keyed#readme","bugs":{"url":"https://github.com/humanspeak/svelte-keyed/issues"},"dist":{"shasum":"1b67dc7045f7066a946611bcb7d03576ee820a6b","tarball":"https://registry.npmjs.org/@humanspeak/svelte-keyed/-/svelte-keyed-3.1.0.tgz","fileCount":5,"integrity":"sha512-Ficbv1GeSUsTZYZobY9kdi/GjZyMwCeCGPhASOq2s4itMelHRCS98l1Rn3UnoLkByHjC0UmtysPm6DMZ9+D6OQ==","signatures":[{"sig":"MEUCIAm8moJox9kpXvLNcVLlEHTLvuzUPu06itH/FkqZ/Gx3AiEAyYGPp0t4lJSi4E40/7m2gn1b9K+h87P6Dc5jp9SfsYE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":23454},"type":"module","types":"./dist/index.d.ts","volta":{"node":"22.12.0"},"svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"a6a3ac4df26a114b4edaf37d475abc9f130f0297","scripts":{"dev":"vite dev","lint":"prettier --check . && eslint .","test":"vitest run --coverage","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","package":"svelte-kit sync && svelte-package && publint","preview":"vite preview","lint:fix":"npm run format && eslint . --fix","test:only":"vitest run","test:watch":"vitest","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"humanspeakadmin","email":"admin@humanspeak.com"},"overrides":{"@sveltejs/kit":{"cookie":"^0.7.0"}},"repository":{"url":"git+ssh://git@github.com/humanspeak/svelte-keyed.git","type":"git"},"_npmVersion":"10.9.0","description":"[![NPM version](https://img.shields.io/npm/v/@humanspeak/svelte-keyed.svg)](https://www.npmjs.com/package/@humanspeak/svelte-keyed) [![Build Status](https://github.com/humanspeak/svelte-keyed/actions/workflows/npm-publish.yml/badge.svg)](https://github.co","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^6.0.7","tslib":"^2.8.1","eslint":"^9.17.0","svelte":"^5.16.1","vitest":"^2.1.8","globals":"^15.14.0","publint":"^0.2.12","prettier":"^3.4.2","type-fest":"^4.31.0","@eslint/js":"^9.17.0","typescript":"^5.7.2","svelte-check":"^4.1.1","@sveltejs/kit":"^2.15.1","@types/eslint":"9.6.1","@eslint/eslintrc":"^3.2.0","@sveltejs/package":"^2.3.7","@vitest/coverage-v8":"^2.1.8","eslint-plugin-svelte":"^2.46.1","@sveltejs/adapter-auto":"^3.3.1","eslint-config-prettier":"^9.1.0","prettier-plugin-svelte":"^3.3.2","@typescript-eslint/parser":"^8.19.0","@sveltejs/vite-plugin-svelte":"^5.0.3","@typescript-eslint/eslint-plugin":"^8.19.0"},"peerDependencies":{"svelte":"^5.1.3"},"_npmOperationalInternal":{"tmp":"tmp/svelte-keyed_3.1.0_1735856820078_0.7590259522044651","host":"s3://npm-registry-packages-npm-production"}},"4.0.0":{"name":"@humanspeak/svelte-keyed","version":"4.0.0","keywords":["svelte","sveltejs","derived","store","rxjs"],"author":{"name":"Humanspeak, Inc."},"license":"MIT","_id":"@humanspeak/svelte-keyed@4.0.0","maintainers":[{"name":"humanspeakadmin","email":"admin@humanspeak.com"}],"homepage":"https://github.com/humanspeak/svelte-keyed#readme","bugs":{"url":"https://github.com/humanspeak/svelte-keyed/issues"},"dist":{"shasum":"301c197cc7bda189ce3ba150e9fb03b290e557d5","tarball":"https://registry.npmjs.org/@humanspeak/svelte-keyed/-/svelte-keyed-4.0.0.tgz","fileCount":5,"integrity":"sha512-GYXgnvWCFdzlskW+Qun6rYNrZuVBw8P3t1l8NBcXjbWgyovBS9LA0rvhbyj2SVSeqOFBuReHAn4zY2Ic503bjg==","signatures":[{"sig":"MEUCIQDj9K/WengsBpEqZmxQOiXpIzMagcnbUCf9Iv983YO2xQIgOwKG0isYTKPtJXEFoeimm4lPyloyqn8Q5/P/2pnP2VM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@humanspeak%2fsvelte-keyed@4.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11821},"type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"b79955b31f012cd81975a492a27037cf95a3fdae","scripts":{"dev":"vite dev","lint":"prettier --check . && eslint .","test":"vitest run --coverage","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","package":"svelte-kit sync && svelte-package && publint","preview":"vite preview","lint:fix":"npm run format && eslint . --fix","test:only":"vitest run","test:watch":"vitest","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"humanspeakadmin","email":"admin@humanspeak.com"},"repository":{"url":"git+ssh://git@github.com/humanspeak/svelte-keyed.git","type":"git"},"_npmVersion":"10.9.0","description":"![svelte-keyed-banner](https://user-images.githubusercontent.com/42545742/145455110-0d90603a-5fb3-453a-a9ea-7c4e3b443913.png)","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.3","tslib":"^2.4.1","eslint":"^8.56.0","svelte":"^4.2.7","vitest":"^1.0.0","publint":"^0.1.9","prettier":"^3.1.1","type-fest":"^4.9.0","typescript":"^5.0.0","svelte-check":"^3.6.0","@sveltejs/kit":"^2.0.0","@types/eslint":"8.56.0","@sveltejs/package":"^2.0.0","@vitest/coverage-v8":"^1.1.1","eslint-plugin-svelte":"^2.35.1","@sveltejs/adapter-auto":"^3.0.0","eslint-config-prettier":"^9.1.0","prettier-plugin-svelte":"^3.1.2","@typescript-eslint/parser":"^6.0.0","@sveltejs/vite-plugin-svelte":"^3.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte-keyed_4.0.0_1737560664473_0.557917424229593","host":"s3://npm-registry-packages-npm-production"}},"5.0.0":{"name":"@humanspeak/svelte-keyed","version":"5.0.0","keywords":["svelte","sveltejs","derived","store","rxjs"],"author":{"name":"Humanspeak, Inc."},"license":"MIT","_id":"@humanspeak/svelte-keyed@5.0.0","maintainers":[{"name":"humanspeakadmin","email":"admin@humanspeak.com"}],"homepage":"https://github.com/humanspeak/svelte-keyed#readme","bugs":{"url":"https://github.com/humanspeak/svelte-keyed/issues"},"dist":{"shasum":"f06a52c45b58168ae21f7cabbb6ca6b6b4620b8f","tarball":"https://registry.npmjs.org/@humanspeak/svelte-keyed/-/svelte-keyed-5.0.0.tgz","fileCount":5,"integrity":"sha512-uXUo2o55za8n/QWPFF5hDwW4NFEvNdIHib6djg2aNaRzQp4T3p81J0+oXdZ7ywH33q8k38cfcv71kt3L5txt9A==","signatures":[{"sig":"MEQCIBB0xgv9cKIbKYLAxp2/VSfE0ETn+WfzNjxlaFJT9nRKAiAisFwmJuoh+d976M1Gu7V+5z03LFq0nMBZqpGK+6CK5g==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@humanspeak%2fsvelte-keyed@5.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":11821},"type":"module","types":"./dist/index.d.ts","svelte":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js","default":"./dist/index.js"}},"gitHead":"440eda741400034c5b447c0698a3cf07ec77ef8c","scripts":{"dev":"vite dev","lint":"prettier --check . && eslint .","test":"vitest run --coverage","build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","format":"prettier --write .","package":"svelte-kit sync && svelte-package && publint","preview":"vite preview","lint:fix":"npm run format && eslint . --fix","test:only":"vitest run","test:watch":"vitest","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","prepublishOnly":"npm run package"},"_npmUser":{"name":"humanspeakadmin","email":"admin@humanspeak.com"},"repository":{"url":"git+ssh://git@github.com/humanspeak/svelte-keyed.git","type":"git"},"_npmVersion":"10.9.0","description":"![svelte-keyed-banner](https://user-images.githubusercontent.com/42545742/145455110-0d90603a-5fb3-453a-a9ea-7c4e3b443913.png)","directories":{},"_nodeVersion":"22.12.0","_hasShrinkwrap":false,"devDependencies":{"vite":"^5.0.3","tslib":"^2.4.1","eslint":"^8.56.0","svelte":"^4.2.7","vitest":"^1.0.0","publint":"^0.1.9","prettier":"^3.1.1","type-fest":"^4.9.0","typescript":"^5.0.0","svelte-check":"^3.6.0","@sveltejs/kit":"^2.0.0","@types/eslint":"8.56.0","@sveltejs/package":"^2.0.0","@vitest/coverage-v8":"^1.1.1","eslint-plugin-svelte":"^2.35.1","@sveltejs/adapter-auto":"^3.0.0","eslint-config-prettier":"^9.1.0","prettier-plugin-svelte":"^3.1.2","@typescript-eslint/parser":"^6.0.0","@sveltejs/vite-plugin-svelte":"^3.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/svelte-keyed_5.0.0_1737582405177_0.7966180272551098","host":"s3://npm-registry-packages-npm-production"}},"5.0.1":{"name":"@humanspeak/svelte-keyed","version":"5.0.1","description":"A powerful writable derived store for Svelte that enables deep object and array manipulation with TypeScript support","keywords":["svelte","derived","store","rxjs","state-management","typescript","svelte5","sveltekit","reactive","nested-store","object-store","array-store"],"homepage":"https://github.com/humanspeak/svelte-keyed#readme","bugs":{"url":"https://github.com/humanspeak/svelte-keyed/issues"},"repository":{"type":"git","url":"git+ssh://git@github.com/humanspeak/svelte-keyed.git"},"license":"MIT","author":{"name":"Humanspeak, Inc."},"type":"module","exports":{".":{"types":"./dist/index.d.ts","svelte":"./dist/index.js","default":"./dist/index.js"}},"svelte":"./dist/index.js","types":"./dist/index.d.ts","scripts":{"build":"vite build && npm run package","check":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","dev":"vite dev","format":"prettier --write .","lint":"prettier --check . && eslint .","lint:fix":"npm run format && eslint . --fix","package":"svelte-kit sync && svelte-package && publint","prepublishOnly":"npm run package","preview":"vite preview","test":"vitest run --coverage","test:only":"vitest run","test:watch":"vitest"},"devDependencies":{"@eslint/eslintrc":"^3.2.0","@eslint/js":"^9.19.0","@sveltejs/adapter-auto":"^4.0.0","@sveltejs/kit":"^2.16.1","@sveltejs/package":"^2.3.9","@sveltejs/vite-plugin-svelte":"^5.0.3","@typescript-eslint/eslint-plugin":"^8.22.0","@typescript-eslint/parser":"^8.22.0","@vitest/coverage-v8":"^3.0.4","eslint":"^9.19.0","eslint-config-prettier":"^10.0.1","eslint-plugin-svelte":"^2.46.1","globals":"^15.14.0","prettier":"^3.4.2","prettier-plugin-organize-imports":"^4.1.0","prettier-plugin-svelte":"^3.3.3","publint":"^0.3.2","svelte":"^5.19.3","svelte-check":"^4.1.4","tslib":"^2.8.1","type-fest":"^4.33.0","typescript":"^5.7.3","vite":"^6.0.11","vitest":"^3.0.4"},"volta":{"node":"22.13.1"},"overrides":{"@sveltejs/kit":{"cookie":"^0.7.0"}},"_id":"@humanspeak/svelte-keyed@5.0.1","gitHead":"70e39857828d2e8f6ccf0c631133e4c422283426","_nodeVersion":"22.13.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-jFvANd9Nb5B/u9ELTSw1iUyuckgjF9R15BvK1V7eLLPurt4hxu35bZAoZMkqYxmj8fazcSw9UkmEu66jZ0+0Rg==","shasum":"fb8ce722da6b0f36bf4b51ad767d0ff3dbe9245f","tarball":"https://registry.npmjs.org/@humanspeak/svelte-keyed/-/svelte-keyed-5.0.1.tgz","fileCount":5,"unpackedSize":17196,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@humanspeak%2fsvelte-keyed@5.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCW/muxgoxvuUrMy5usqzWj7iXEfM44yOOowGQ31R+p9wIhAOLFsPuFGdXDX6w/EkX/4yvajtTdNtcy2wJ2Fisyvo5E"}]},"_npmUser":{"name":"humanspeakadmin","email":"admin@humanspeak.com"},"directories":{},"maintainers":[{"name":"humanspeakadmin","email":"admin@humanspeak.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/svelte-keyed_5.0.1_1738006174417_0.3373244848628718"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-10T19:45:38.377Z","modified":"2025-01-27T19:29:35.068Z","3.0.0":"2024-11-10T19:45:38.609Z","3.0.1":"2024-12-06T15:33:42.196Z","3.1.0":"2025-01-02T22:27:00.299Z","4.0.0":"2025-01-22T15:44:24.684Z","5.0.0":"2025-01-22T21:46:45.388Z","5.0.1":"2025-01-27T19:29:34.608Z"},"bugs":{"url":"https://github.com/humanspeak/svelte-keyed/issues"},"author":{"name":"Humanspeak, Inc."},"license":"MIT","homepage":"https://github.com/humanspeak/svelte-keyed#readme","keywords":["svelte","derived","store","rxjs","state-management","typescript","svelte5","sveltekit","reactive","nested-store","object-store","array-store"],"repository":{"type":"git","url":"git+ssh://git@github.com/humanspeak/svelte-keyed.git"},"description":"A powerful writable derived store for Svelte that enables deep object and array manipulation with TypeScript support","maintainers":[{"name":"humanspeakadmin","email":"admin@humanspeak.com"}],"readme":"# @humanspeak/svelte-keyed\n\n![svelte-keyed-banner](https://user-images.githubusercontent.com/42545742/145455110-0d90603a-5fb3-453a-a9ea-7c4e3b443913.png)\n\n> A powerful TypeScript-first derived store for Svelte 5 that enables deep object and array manipulation with full reactivity.\n\n[![npm version](http://img.shields.io/npm/v/@humanspeak/svelte-keyed.svg)](https://www.npmjs.com/package/humanspeak/svelte-keyed)\n![build](https://img.shields.io/github/actions/workflow/status/humanspeak/svelte-keyed/npm-publish.yml)\n[![coverage](https://coveralls.io/repos/github/humanspeak/svelte-keyed/badge.svg?branch=main)](https://coveralls.io/github/humanspeak/svelte-keyed?branch=main)\n[![Downloads](https://img.shields.io/npm/dm/@humanspeak/svelte-keyed.svg)](https://www.npmjs.com/package/@humanspeak/svelte-keyed)\n[![License](https://img.shields.io/npm/l/@humanspeak/svelte-keyed.svg)](https://github.com/humanspeak/svelte-keyed/blob/main/LICENSE)\n[![CodeQL](https://github.com/humanspeak/svelte-keyed/actions/workflows/codeql.yml/badge.svg)](https://github.com/humanspeak/svelte-keyed/actions/workflows/codeql.yml)\n[![Install size](https://packagephobia.com/badge?p=@humanspeak/svelte-keyed)](https://packagephobia.com/result?p=@humanspeak/svelte-keyed)\n[![Code Style: Trunk](https://img.shields.io/badge/code%20style-trunk-blue.svg)](https://trunk.io)\n\n## Features\n\n- 🎯 **Type-Safe**: Full TypeScript support with automatic type inference\n- 🔄 **Reactive**: Deep object and array manipulation with automatic updates\n- 🎨 **Svelte 5 Ready**: Built for the latest Svelte features\n- 🪶 **Lightweight**: Zero dependencies, tiny bundle size\n- 🔒 **Null-Safe**: Built-in handling for nullable types\n- 🎮 **Easy API**: Simple dot notation for deep object access\n\n## Quick Start\n\n```js\nconst user = writable({ name: { first: 'Rich', last: 'Harris' } })\nconst firstName = keyed(user, 'name.first')\n\n$firstName = 'Bryan'\n\nconsole.log($user) // { name: { first: 'Bryan', last: 'Harris' } };\n```\n\n## Installation\n\n```bash\n\nnpm i -D svelte-keyed\n\n```\n\nSince Svelte automatically bundles all required dependencies, you only need to install this package as a dev dependency with the `-D` flag.\n\n## Why svelte-keyed?\n\nWhile Svelte's built-in stores are powerful, they don't provide an elegant way to work with nested properties. svelte-keyed solves this by:\n\n- Enabling direct manipulation of nested properties\n- Maintaining full TypeScript support\n- Providing a clean API for complex state management\n- Supporting both object and array access patterns\n\n## API\n\n`keyed` takes a writable object store and a **keypath**, and returns a writable store whose _changes are reflected on the original store_.\n\nProperties are accessed with dot notation, and arrays can be indexed with bracket notation.\n\n```js\nconst email = keyed(settings, 'profiles[0].email')\n```\n\n### Nullable parents\n\nIf the parent store is nullable, then the child store will also be nullable.\n\n```ts\ntype User = {\n    name: {\n        first: string\n        last: string\n    }\n    relations: {\n        partner?: User\n    }\n}\n\nconst maybeUser = writable<User | undefined>(undefined)\n// Writable<string | undefined>\nconst firstName = keyed(maybeUser, 'name.first')\n```\n\n### Nullable properties\n\nNullable properties are accessed with [optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) behaviour.\n\n```ts\nconst user = writable(initUser)\n// Writable<Name | undefined>\nconst partnerName = keyed(user, 'relations.partner.name')\n```\n\n### TypeScript\n\n`keyed` infers the return type of the keyed store from the keypath.\n\n```ts\nconst user = writable(initUser)\n// Writable<string>\nconst firstName = keyed(user, 'name.first')\n```\n\n`keyed` will also try to guess all possible keypaths up to a depth limit of 3.\n\n```ts\nkeyed(user, '...');\n            ┌───────────────────────────────┐\n            │ • name                        │\n            │ • name.first                  │\n            │ • name.last                   │\n            │ • relations                   │\n            │ • relations.partner           │\n            │ • relations.partner.name      │\n            └───────────────────────────────┘\n```\n\n_This limit is due to a TypeScript limitation where structured types must be generated statically. Increasing the depth limit slows down type compilation._\n\nType hints will not be provided for keypaths with a depth greater than 3 but this does not affect the return type.\n\n```ts\nconst user = writable(user)\n// Writable<string | undefined>\nconst firstName = keyed(user, 'relations.partner.name.first')\n```\n\n## Motivations\n\nWe usually read and write properties of an object store with [auto-subscriptions](https://svelte.dev/tutorial/auto-subscriptions).\n\n```svelte\n<input bind:value={$name.first} />\n```\n\nHowever, auto-subscriptions are isolated to a Svelte component. `svelte-keyed` aims to solve several common limitations listed below.\n\n### Context stores\n\nOften, we want to set a property or element of a store into component context, then allow child components to read / write to the property.\n\n```svelte\n<!-- Settings.svelte -->\n<script>\n    setContext('profileSettings', keyed(settings, 'profile'))\n</script>\n\n<GeneralSettings />\n<ProfileSettings />\n```\n\n```svelte\n<!-- ProfileSettings.svelte -->\n<script>\n    const profileSettings = getContext('profileSettings')\n</script>\n\n<input type=\"text\" bind:value={$profileSettings.username} />\n```\n\n### Helper functions\n\nOne important method to reduce clutter on your component is to extract functionality into external helper functions. `svelte-keyed` allows you to create derived `Writable` stores that can be passed into or returned from helper functions.\n\n```svelte\n<!-- Settings.svelte -->\n<script>\n    const stats = writable({ userClicks: 0, userTaps: 0 })\n    const clicks = keyed(stats, 'userClicks')\n</script>\n\n<div use:trackClicks={clicks} />\n<input use:trackClicks={clicks} />\n```\n\n```js\nexport const trackClicks = (node, clicks) => {\n    const listen = () => {\n        clicks.update(($clicks) => $clicks + 1)\n    }\n    node.addEventListener('click', listen)\n    return {\n        destroy() {\n            node.removeEventListener('click', listen)\n        }\n    }\n}\n```\n\n## License\n\nMIT © [Humanspeak, Inc.](LICENSE)\n\n## Credits\n\nMade with ♥ by [Humanspeak](https://humanspeak.com)\n","readmeFilename":"README.md"}