Skip to content

SmirnovW/vue-localstorage

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-localstorage

The Vue plugin for work with LocalStorage from Vue context

Introduction

vue-localstorage is wrapper for work with the Storage interface of the Web Storage API.

Development Setup

# install deps
yarn install

# build dist files
gulp

# run tests
yarn run test

Usage

This is looks like work with the Web Storage API.

    new Vue({
        el: '#app',
        mounted: function() {
            this.$localStorage.set('foo', 'boo');
            //also you can set expire for item
            this.$localStorage.set('foo', 'boo', 60 * 60 * 1000); //set an expiry of item at 1 hour
            this.$localStorage.set('foo', 'boo', 0); //endless item
            this.$localStorage.remove('foo');
        }
    });

Donation

If this project help you reduce time to develop, you can give me a cup of coffee :)

paypal

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.4%
  • HTML 8.6%