{"id":19655337,"url":"https://github.com/kbdsbx/vuex-declaration","last_synced_at":"2026-05-12T21:08:22.509Z","repository":{"id":38003138,"uuid":"165780310","full_name":"kbdsbx/vuex-declaration","owner":"kbdsbx","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-05T03:08:17.000Z","size":2904,"stargazers_count":2,"open_issues_count":25,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-27T02:17:26.847Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kbdsbx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-15T03:39:30.000Z","updated_at":"2020-07-30T17:01:30.000Z","dependencies_parsed_at":"2023-02-03T07:45:35.437Z","dependency_job_id":null,"html_url":"https://github.com/kbdsbx/vuex-declaration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kbdsbx/vuex-declaration","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbdsbx%2Fvuex-declaration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbdsbx%2Fvuex-declaration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbdsbx%2Fvuex-declaration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbdsbx%2Fvuex-declaration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kbdsbx","download_url":"https://codeload.github.com/kbdsbx/vuex-declaration/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kbdsbx%2Fvuex-declaration/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285532617,"owners_count":27187755,"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-11-20T02:00:05.334Z","response_time":54,"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":[],"created_at":"2024-11-11T15:20:46.071Z","updated_at":"2025-11-21T00:06:04.211Z","avatar_url":"https://github.com/kbdsbx.png","language":"JavaScript","funding_links":[],"categories":["Components \u0026 Libraries","Utilities","Utilities [🔝](#readme)"],"sub_categories":["Utilities","State Management"],"readme":"# Vuex Declaration\n\nDeclare state like props, make state inject to vuex dynamically when component created.\n\n## Usage\n\n```bash\nnpm i vuex-declaration\n```\n\n```js\nimport vuecDeclaration from 'vuex-declaration'\nimport Vue from 'vue'\nVue.use( vuexDeclaration );\n```\n\n```js\nVue.component( 'self-component', {\n    data () { ... },\n    props : [ ... ],\n    created () { ... },\n\n    // Declare states\n    state : [ 'state-a', 'state-b' ],\n} )\n```\n\n```js\nexport default {\n    // Declare state with module.\n    state : {\n        'state-a' : {\n            module : 'module-a',\n        }\n    }\n}\n```\n\n## Apis\n\n#### setStoreModule\nAppend states to existing modules.\n\n```js\nimport { setStoreModule } from 'vuex-declaration'\n\nsetStoreModule( this.$store, [ 'state-a', 'state-b' ] )\n```\n\n#### resetStoreModule\nUnreginster all modules from $store and then reset these.\n\n```js\nimport { resetStoreModule } from 'vuex-declaration'\n\nresetStoreModule( this.$store, [ 'state-a', 'state-b' ] )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbdsbx%2Fvuex-declaration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkbdsbx%2Fvuex-declaration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkbdsbx%2Fvuex-declaration/lists"}