vuex-localstorage

by crossjs

Persist Vuex state with expires by localStorage or some else storage.

127 Stars 10 Forks Last release: over 3 years ago (1.0.0) 33 Commits 5 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

VUEX-LOCALSTORAGE

:dvd: Persist Vuex state with expires by localStorage or some else storage.

Travis Coveralls dependencies devDependency Status NPM version

Usage

import { Store } from 'vuex'
import createPersist from 'vuex-localstorage'

new Store({ plugins: [createPersist({ namespace: 'namespace-for-state', initialState: {}, // ONE_WEEK expires: 7 * 24 * 60 * 60 * 1e3 })] }

Live Example at PLATO

Development Setup

# install deps
npm install

build dist files

npm run build

lint & run all tests

npm test

run unit tests only

npm run unit

Special Thanks

vuex-persistedstate

License

MIT

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.