Browser storage plugin for Vue.js 2.x applications, providing a reactive wrapper around localStorage, sessionStorage, and memoryStorage. Current version 6.1.3 is stable with TypeScript support. Released under MIT license, it offers a simple API for setting, getting, removing, and clearing stored values with automatic JSON serialization/deserialization. It integrates seamlessly as a Vue plugin, exposing `$storage` on Vue instances, or can be used standalone in vanilla JavaScript. Alternative to vue-ls and vue-localstorage, with focus on minimalism and Vue 2 reactivity.
npm install vue2-storageNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Vue 2 plugin installation with namespace and storage type, setting and getting a JSON value.
Update to import { Vue2StoragePlugin } from 'vue2-storage'.Use the standalone Vue2Storage class directly: import { Vue2Storage } from 'vue2-storage'.Use { storage: 'memoryStorage' } instead of 'memory'.Ensure Vue is installed and imported before using the plugin. For standalone usage, use Vue2Storage class instead.
Call Vue.use(Vue2StoragePlugin, options) before creating the root Vue instance.