Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vuex-persistedstate

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vuex-persistedstate

Persist Vuex state with localStorage.

  • 0.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
100K
decreased by-8.32%
Maintainers
1
Weekly downloads
 
Created
Source

vuex-persistedstate

Persist Vuex state with localStorage.

NPM version Build Status

Installation

$ npm install vuex-persistedstate

Usage

import createPersistedState from 'vuex-persistedstate'

const store = new Vuex.Store({
  // ...
  plugins: [createPersistedState()]
})

API

createPersistedState([options])

Creates a new instance of the plugin with the given options. The following options can be provided to configure the plugin for your specific needs:

  • key <String>: The key to store the persisted state under. (default: vuex)
  • paths <Array>: An array of any paths to partially persist the state. If no paths are given, the complete state is persisted. (default: [])
  • getState <Function>: A function that will be called to rehydrate a previously persisted state. Defaults to localStorage.
  • setState <Function>: A function that will be called to persist the given state. Defaults to localStorage.

License

MIT

Keywords

FAQs

Package last updated on 26 Sep 2016

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