vue-localstorage
The Vue plugin for work with LocalStorage from Vue context, with cookie fallback.
Introduction
vue-localstorage
is wrapper for work with the Storage interface of the Web Storage API.
If localStorage is not available, such as in Safari Incognito mode, then cookie will be used.
Notice that max cookie size is around 4kb.
Development Setup
# install depsyarn install# build dist filesyarn compile# run testsyarn run test
Usage
This is looks like work with the Web Storage API.
el: '#app'{this$localStorage;// also, you can set expire for itemthis$localStorage; // set an expiry of item at 1 hourthis$localStorage; // endless itemthis$localStorage; // get foo valuethis$localStorage;};
Donation
If this project help you reduce time to develop, you can give me a cup of coffee :)