{"id":29822399,"url":"https://github.com/bazzite/vue-warehouse","last_synced_at":"2025-07-29T01:03:24.041Z","repository":{"id":38427154,"uuid":"126490856","full_name":"juliomrqz/vue-warehouse","owner":"juliomrqz","description":"A Cross-browser storage for Vue.js and Nuxt.js, with plugins support and easy extensibility based on Store.js. ","archived":false,"fork":false,"pushed_at":"2023-01-07T04:04:47.000Z","size":4066,"stargazers_count":174,"open_issues_count":30,"forks_count":9,"subscribers_count":8,"default_branch":"develop","last_synced_at":"2025-07-22T07:41:30.986Z","etag":null,"topics":["browser-storage","cookie","cookies","cross-browser","expiration","localstorage","marquez","nuxt","nuxt-module","storage","storage-functionality","vue","vue-plugin"],"latest_commit_sha":null,"homepage":"https://marquez.co/docs/vue-warehouse","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/juliomrqz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-23T13:43:32.000Z","updated_at":"2024-03-11T19:44:01.000Z","dependencies_parsed_at":"2023-02-06T11:16:43.944Z","dependency_job_id":null,"html_url":"https://github.com/juliomrqz/vue-warehouse","commit_stats":null,"previous_names":["bazzite/vue-warehouse"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/juliomrqz/vue-warehouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliomrqz%2Fvue-warehouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliomrqz%2Fvue-warehouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliomrqz%2Fvue-warehouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliomrqz%2Fvue-warehouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juliomrqz","download_url":"https://codeload.github.com/juliomrqz/vue-warehouse/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juliomrqz%2Fvue-warehouse/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267612616,"owners_count":24115494,"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-07-28T02:00:09.689Z","response_time":68,"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":["browser-storage","cookie","cookies","cross-browser","expiration","localstorage","marquez","nuxt","nuxt-module","storage","storage-functionality","vue","vue-plugin"],"created_at":"2025-07-29T01:01:29.647Z","updated_at":"2025-07-29T01:03:24.023Z","avatar_url":"https://github.com/juliomrqz.png","language":"JavaScript","funding_links":[],"categories":["Utilities [🔝](#readme)","公用事业","Components \u0026 Libraries","Uncategorized","Utilities"],"sub_categories":["坚持","Utilities","Uncategorized","Persistence"],"readme":"[![Codacy Badge](https://img.shields.io/codacy/grade/6fd62c3807d84982bfbd6e3298707bef.svg)](https://www.codacy.com/app/juliomrqz/vue-warehouse?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=juliomrqz/vue-warehouse\u0026utm_campaign=Badge_Grade)\n[![Travis](https://img.shields.io/travis/juliomrqz/vue-warehouse.svg)](https://travis-ci.org/juliomrqz/vue-warehouse)\n[![Build status](https://ci.appveyor.com/api/projects/status/5ihdnfef7siyph3n?svg=true)](https://ci.appveyor.com/project/juliomrqz/vue-warehouse)\n[![codecov](https://img.shields.io/codecov/c/github/juliomrqz/vue-warehouse/develop.svg)](https://codecov.io/gh/juliomrqz/vue-warehouse)\n[![David](https://img.shields.io/david/peer/juliomrqz/vue-warehouse.svg)](https://david-dm.org/juliomrqz/vue-warehouse?type=peer)\n[![David](https://img.shields.io/david/dev/juliomrqz/vue-warehouse.svg)](https://david-dm.org/juliomrqz/vue-warehouse?type=dev)\n[![version](https://img.shields.io/npm/v/vue-warehouse.svg)](https://www.npmjs.com/package/vue-warehouse)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/juliomrqz/vue-warehouse/develop/LICENSE)\n\n# Vue.js Warehouse\n\nA Cross-browser storage for **Vue.js** and **Nuxt.js**, with plugins support and easy extensibility based on **Store.js**.\n\nThis plugin will **pick the best available browser storage**, and automatically **falls back to the first available** storage that works.\n\n*Read this in other languages: [English][documentation], [Español][documentation-es]*\n\n## Features\n\n* Backed by the great library [Store.js][storejs]\n* Support for multiple Storages (localStorage, cookies, etc.)\n* Basic key/value storage functionality (`get/set/remove/each`)\n* Easy integration with Vue.js\n* Support for Nuxt.js\n* Get notified with Vuex when the stored values change\n\n## Why use this plugin\n\nSome reasons why you could consider to use this plugin:\n\n* Use a **fallback Browser storage** method in case the user's browser has limitations. Safari in Private mode can deny writing data in localStorage.\n* Easy extensibility with **Plugins**. Support for expiring stored values at a given time, declare default values, etc.\n* A **consistent API** across browsers for a key/value storage functionality.\n* Easy definition of **alternative Storage methods**. For example: you could reuse a Vue Component, that relies on a storage method, in the user's browser (using **localStorage**) or a mobile app (using **NativeScript application-settings** module) just by changing the storage method without modifying the internal logic of the component.\n* **Synchronization** of stored values changes with **Vuex**.\n\n## Installation\n\nThis module is distributed via [npm][npm-homepage] which is bundled with [node][node-homepage] and should be installed as one of your project's `dependencies`:\n\n```bash\nnpm install --save store vue-warehouse\n```\n\nor\n\n```bash\nyarn add store vue-warehouse\n```\n\n## Example of use\n\nSuppose you want to use **localStorage** by default and **cookies** as an alternative in case your user's browser doesn't allow any interaction with **localStorage** (Safari Private mode). Besides, you want to define **defaults values** and an **expiration date** for all the data that is going to be saved.\n\n### Configuration for Vue.js\n\n```javascript\nimport Vue from 'vue'\nimport VueWarehouse from 'vue-warehouse'\nimport VueWarehouseSync from 'vue-warehouse/sync'\n\nimport VuexStore from './vuex/store' // vuex store instance\nimport VueWarehouseStore from 'store' // vue-warehouse store instance\n\nVueWarehouseSync(VuexStore, VueWarehouseStore)\n\nVue.use(VueWarehouse, {\n  store: VueWarehouseStore,\n  plugins: [\n    require('store/plugins/expire'),   // Expire stored values at a given time\n    require('store/plugins/defaults')  // Declare default values\n  ],\n  storages: [\n    require('store/storages/localStorage'),  // localStorage support\n    require('store/storages/cookieStorage')  // cookies support\n  ]\n})\n```\n\n### Configuration for Nuxt.js\n\n```javascript\n{\n  modules: [\n    ['vue-warehouse/nuxt',\n      {\n        vuex: true,\n        plugins: [\n          'store/plugins/expire',\n          'store/plugins/defaults'\n        ],\n        storages: [\n          'store/storages/localStorage',\n          'store/storages/cookieStorage'\n        ]\n      }\n    ],\n  ]\n}\n```\n\n### API Usage\n\n```javascript\n// Define defaults values\nthis.$warehouse.defaults({ user: { name: 'John Doe' } })\n\n// Change current user with an expiration date of 2 hours starting from now\nconst expiration = new Date().getTime() + (3600 * 2000)\nthis.$warehouse.set('user', { name:'Marie Doe' }, expiration)\n\n// Get current user value\nthis.$warehouse.get('user')\n\n// Get current user expiration\nthis.$warehouse.getExpiration('user')\n\n// Remove current user\nthis.$warehouse.remove('user') // return the default value -\u003e { name: 'John Doe' }\n\n// Clear all keys\nthis.$warehouse.clearAll()\n\n// Loop over all stored values\nthis.$warehouse.each(function(value, key) {\n\tconsole.log(key, '==', value)\n})\n```\n\n### Vuex State\n\nThe last change made to the **browser store** (localStorage, cookie, etc.) are synced with the Vuex state:\n\n```javascript\n// Store current user\nthis.$warehouse.set('user', { name: 'John Doe' })\n\n// Update the user\nthis.$warehouse.set('user', { name: 'Marie Doe' })\n\n// get state values\nstore.state.warehouse.action    // action performed -\u003e set\nstore.state.warehouse.key       // key affected     -\u003e user\nstore.state.warehouse.value     // stored value     -\u003e { name: 'Marie Doe' }\nstore.state.warehouse.oldValue  // last value       -\u003e { name: 'John Doe' }\n```\n\n## Documentation \u0026 Support\n\n- 📄 If you want extra details of how to configure and use this plugin, the full documentation is available at [https://marquez.co/docs/vue-warehouse][documentation].\n- 🐞 For Bug reports or Feature requests, use the [Issues section][issues].\n- 💬 For **questions**, you can also use the [Issues section][issues].\n- 🚀 You may also want to **follow me** [on Twitter][twitter].\n\n## Professional Support\n\nThis project is sponsored by me, a Full Stack Developer. If you require Professional Assistance on your project(s), please contact me at [https://marquez.co][contact-page].\n\n## Contributing\n\nPlease make sure to read the [Contributing Guide][contributing] before making a pull request.\n\n## Code of Conduct\n\nEveryone participating in this project is expected to agree to abide by the [Code of Conduct][code-of-conduct].\n\n## License\n\nCode released under the  [MIT License][license-page].\n\n![](https://ga-beacon.appspot.com/UA-65885578-17/juliomrqz/vue-warehouse?pixel)\n\n[npm-homepage]: https://www.npmjs.com/\n[node-homepage]: https://nodejs.org\n[storejs]: https://github.com/marcuswestin/store.js/\n[documentation]: https://marquez.co/docs/vue-warehouse?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=vue-warehouse\n[documentation-es]: https://marquez.co/es/docs/vue-warehouse?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=vue-warehouse\n[contributing]: https://marquez.co/docs/vue-warehouse/contributing?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=vue-warehouse\n[code-of-conduct]: https://www.contributor-covenant.org/version/2/0/code_of_conduct/\n[issues]: https://github.com/juliomrqz/vue-warehouse/issues\n[spectrum-chat]: https://spectrum.chat/bazzite/login?r=https://spectrum.chat/bazzite/open-source\n[twitter]: https://twitter.com/AceforthHQ\n[contact-page]: https://marquez.co?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=vue-warehouse\n[license-page]: https://marquez.co/docs/vue-warehouse/license?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=vue-warehouse\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazzite%2Fvue-warehouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbazzite%2Fvue-warehouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbazzite%2Fvue-warehouse/lists"}