This package has been deprecated

Author message:

This package is no longer supported. use at your own risk.

vue-storage-helper

1.0.3 • Public • Published

vue-storage-helper

A storage-helper wrapper for Vue

Docs

For the documentation please check storage-helper repository docs

Usage

All available methods are the same as storage-helper, but here they are directly available in the Vue prototype object.

import Vue from 'vue'
import VueStorageHelper from 'vue-storage-helper'
 
Vue.use(VueStorageHelper, { debug: true })
 
const component = new Vue({
  mounted () {
    this.$setItem('foo', 'bar')
  },
  computed: {
    value: function () {
      return this.$getItem('foo') // returns 'bar'
    }
  },
  methods: {
    removeStoredItem () {
      this.$removeItem('foo')
    },
    clearAllStoredItems () {
      this.$clearItems()
    }
  }
})
 

Package Sidebar

Install

npm i vue-storage-helper

Weekly Downloads

1

Version

1.0.3

License

ISC

Last publish

Collaborators

  • matteo_gabriele