New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vuex-persisted-shared-state

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuex-persisted-shared-state

Persist Vuex state with localStorage and share between tabs.

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

vuex-persisted-shared-state

Persist Vuex state with localStorage and share between tabs.

Requirements

  • Vue.js (v2.0.0+)
  • Vuex (v2.0.0+)

Installation

$ npm install vuex-persisted-shared-state

or

$ yarn add vuex-persisted-shared-state

Usage

import persistedSharedState from "vuex-persisted-shared-state";

const store = new Vuex.Store({
    // ...
    plugins: [
        persistedSharedState({
            'cart': 'SET_CART',
        }),
    ]
});

API

persistedSharedState(mutations, options = {})

Creates a new instance of the plugin with the given mutations object and options.

Mutations can be provided like strings

{
    'cart': 'SET_CART',
}

or like an objects

{
    'cart': {
        mutation: 'SET_CART',
        share: false,
        defaultValue: null,
    },
}

The following options can be provided to configure the plugin for your specific needs:

  • share: Should state change be shared between browser tabs. (default: true)
  • prefix: Prefix of the localStorage keys. (default: 'vuex-persisted-shared-state')

Keywords

FAQs

Package last updated on 16 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc