vlstorage

1.0.1 • Public • Published

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
}

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i vlstorage

      Weekly Downloads

      1

      Version

      1.0.1

      License

      ISC

      Unpacked Size

      1.93 kB

      Total Files

      3

      Last publish

      Collaborators

      • yaoxiaxue