{"id":13468794,"url":"https://github.com/davestewart/vuex-pathify","last_synced_at":"2025-05-15T00:12:39.488Z","repository":{"id":30225756,"uuid":"124159503","full_name":"davestewart/vuex-pathify","owner":"davestewart","description":"Vue / Vuex plugin providing a unified path syntax to Vuex stores","archived":false,"fork":false,"pushed_at":"2022-03-20T15:01:10.000Z","size":4165,"stargazers_count":1369,"open_issues_count":31,"forks_count":54,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-05-13T19:21:44.683Z","etag":null,"topics":["state-management","utility","vuejs","vuex"],"latest_commit_sha":null,"homepage":"https://davestewart.github.io/vuex-pathify","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/davestewart.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-07T01:14:27.000Z","updated_at":"2025-05-11T15:33:23.000Z","dependencies_parsed_at":"2022-08-07T15:01:23.972Z","dependency_job_id":null,"html_url":"https://github.com/davestewart/vuex-pathify","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davestewart%2Fvuex-pathify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davestewart%2Fvuex-pathify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davestewart%2Fvuex-pathify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davestewart%2Fvuex-pathify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davestewart","download_url":"https://codeload.github.com/davestewart/vuex-pathify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249206,"owners_count":22039029,"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":["state-management","utility","vuejs","vuex"],"created_at":"2024-07-31T15:01:19.236Z","updated_at":"2025-05-15T00:12:34.477Z","avatar_url":"https://github.com/davestewart.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","vuejs"],"sub_categories":[],"readme":"\n![splash](https://raw.githubusercontent.com/davestewart/vuex-pathify/master/docs/assets/img/readme/splash-github.png)\n\n## Overview\n\nPathify makes working with Vuex **easy**, with a **declarative**, **state-based**, **path syntax**:\n\n![pathify-diagram](https://raw.githubusercontent.com/davestewart/vuex-pathify/master/docs/assets/img/readme/pathify-path.png)\n\n\nPaths can reference any **module**, **property** or **sub-property**:\n\n![pathify-diagram](https://raw.githubusercontent.com/davestewart/vuex-pathify/master/docs/assets/img/readme/pathify-diagram.png)\n\nPathify's aim is to simplify the overall Vuex development experience by abstracting away Vuex's complex setup and reliance on manually-written code. The path syntax does the heavy-lifting, with a small set of helper functions used to directly access or wire up components to the store.\n\n## Examples\n\n**Get** or **set** data without **syntax juggling** or worrying about **implementation**:\n\n```js\nstore.get('loaded')\nstore.set('loaded', true)\n```\n\nReach into **sub-properties** and **arrays**:\n\n```js\nstore.get('products@items.0.name')\nstore.set('products@items.1.name', 'Vuex Pathify')\n```\n\nSet up **one or two-way** data binding on **any** store value without **bloat** or **fuss**:\n\n```js\ncomputed: {\n  products: get('products'),\n  category: sync('filters@category')\n}\n```\n\nWire **multiple** properties (or sub-properties) using **array**, **object** and **wildcard** formats:\n\n```js\ncomputed: {\n  ...sync('filters@sort', [\n    'order', \n    'key'\n  ]),\n\n  ...sync('filters@sort', {\n    sortOrder: 'order',\n    sortKey: 'key'\n  }),\n\n  ...sync('filters@sort.*')\n}\n```\n\nUse **variable expansion** to dynamically reference store properties:\n\n```js\ncomputed: {\n  product: get('products@items:index')\n}\n```\n\nSet up mutations – **including sub-property mutations** – in a single line:\n\n```js\nmake.mutations(state)\n```\n\n## Results\n\nIn practical terms, Pathify results in:\n\n- less cognitive overhead\n- zero store boilerplate\n- one-liner wiring\n- cleaner code\n- lighter files\n\nThe [code comparison](https://codesandbox.io/s/github/davestewart/vuex-pathify-demos/tree/master/main?initialpath=%23%2Fcode%2Flarge) demo demonstrates reductions in lines of code of between **2 and 14 times** (or more) depending on store size and setup.\n\nTo see the principles behind such radical code reduction, check out the [Pathify 101](https://davestewart.github.io/vuex-pathify/#/intro/pathify).\n\n## Next steps\n\nGet started:\n\n- [Installation](https://www.npmjs.com/package/vuex-pathify)\n- [Documentation](https://davestewart.github.io/vuex-pathify)\n\nDemos:\n\n- [Simple demo](https://codesandbox.io/s/github/davestewart/vuex-pathify-demos/tree/master/simple)\n- [Main demo](https://codesandbox.io/s/github/davestewart/vuex-pathify-demos/tree/master/main)\n- [Nuxt demo](https://github.com/davestewart/vuex-pathify-demos/tree/master/nuxt)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavestewart%2Fvuex-pathify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavestewart%2Fvuex-pathify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavestewart%2Fvuex-pathify/lists"}