vlstorage
v1.0.1
Published
Plugins for using sessionStorage or localStorage in vue
Downloads
1
Maintainers
Readme
Vlstorage
Plugin for using sessionStorage or localStorage in vue
Install
npm i vlstorage
Usage
var vlstorage = require("vlstorage")
Vue.use(vlstorage)
In the vue component you can use it like this:
created: function() {
this.$lStorage.setItem("foo", "bar") // localStorage
this.$lStorage.getItem("foo")
this.$lStorage.removeItem("foo")
this.$lStorage.clear()
this.$sStorage.setItem("foo", "bar") // sessionStorage
this.$sStorage.getItem("foo") // sessionStorage
this.$sStorage.removeItem("foo") // sessionStorage
this.$sStorage.clear() // sessionStorage
}